|
 |
asp_web_howto thread: can we have nested functions in ASP
Message #1 by "taherm@f... on Wed, 23 Jan 2002 11:21:50
|
|
Dear friends,
can we have nested functions in asp.. if yes then can someone send me a
syntax for that..
the other function beign in an include file
i gues
function one (pram1,pram2)
some code
<!--#include file="../../includes/function2.inc" -->
txt = function2(txt)
end function
please let me know
thanks a million
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 23 Jan 2002 11:45:03 -0000
|
|
your question is not "can we have nested functions in ASP", but "can we have
nested functions in VBScript", to which the answer is no. However,
javascript does support nested functions, so if you write your ASP in
javascript you can use them.
<%@language="javascript"%>
<%
function function1(x){
y = function2(x);
return y;
function function2(x){
...
}
}
%>
function2 is only available within function1
But you need to ask yourself - does the function really need to be nested?
-----Original Message-----
From: taherm@f...
[mailto:taherm@f...]
Sent: 23 January 2002 11:22
To: ASP Web HowTo
Subject: [asp_web_howto] can we have nested functions in ASP
Dear friends,
can we have nested functions in asp.. if yes then can someone send me a
syntax for that..
the other function beign in an include file
i gues
function one (pram1,pram2)
some code
<!--#include file="../../includes/function2.inc" -->
txt = function2(txt)
end function
please let me know
thanks a million
$subst('Email.Unsub').
________________________________________________________________________
Scottish Enterprise Network
http://www.scottish-enterprise.com
Headquarters Address & Contact Numbers
150 Broomielaw
5 Atlantic Quay
Glasgow
G2 8LU.
Tel: +44 (0) 141 248 2700.
Fax: +44 (0)141 221 3217
This message is sent in confidence for the addressee only.
It may contain legally privileged information. The contents are not to
be disclosed to anyone other than the addressee. Unauthorised recipients
are requested to preserve this confidentiality and to advise the sender
immediately of any error in transmission.
Message #3 by <sathish297@y...> on Thu, 24 Jan 2002 09:57:35 +0530
|
|
Hi
yeah. I have tried nested functions. It works.
But it is not possible to write any recursive functions in ASP
With Regards,
R. Sathish Kumar.
sathish297@y...
----- Original Message -----
From: <taherm@f...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Wednesday, January 23, 2002 11:21 AM
Subject: [asp_web_howto] can we have nested functions in ASP
> Dear friends,
> can we have nested functions in asp.. if yes then can someone send me a
> syntax for that..
> the other function beign in an include file
>
> i gues
>
> function one (pram1,pram2)
> some code
>
> <!--#include file="../../includes/function2.inc" -->
> txt = function2(txt)
>
> end function
>
> please let me know
> thanks a million
$subst('Email.Unsub').
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Message #4 by agaisin@c... on Thu, 24 Jan 2002 01:38:32 +0000
|
|
CORRECTION - It is indeed possible to write and use recursive functions in ASP!!!
Maybe I misunderstood your statement?
For more info, here are some articles about recursion in asp:
http://www.15seconds.com/issue/000803.htm
http://www.4guysfromrolla.com/webtech/060299-2.shtml
http://www.aspalliance.com/mbrink1111/InstallmentII/recursive.asp
- Arthur Gaisin
---- Message from <sathish297@y...> at Thu, 24 Jan 2002 09:57:35 +0530 ------
Hi
yeah. I have tried nested functions. It works.
But it is not possible to write any recursive functions in ASP
With Regards,
R. Sathish Kumar.
sathish297@y...
----- Original Message -----
From: <taherm@f...>
To: "ASP Web HowTo" <asp_web_howto@p...>
Sent: Wednesday, January 23, 2002 11:21 AM
Subject: [asp_web_howto] can we have nested functions in ASP
> Dear friends,
> can we have nested functions in asp.. if yes then can someone send me a
> syntax for that..
> the other function beign in an include file
>
> i gues
>
> function one (pram1,pram2)
> some code
>
> <!--#include file="../../includes/function2.inc" -->
> txt = function2(txt)
>
> end function
>
> please let me know
> thanks a million
$subst('Email.Unsub').
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
|
|
 |