Link to home
Start Free TrialLog in
Avatar of acsakany
acsakany

asked on

ASP Function Return Value

I have just started coding in ASP after coding for years in PHP. I have looked through the internet but cannot find an example of how to code a function that returns a value.

In PHP I would do the following:

$value = myFunction();

function myFunction()
{
    if ($condition1)
        return 1;
    else
        return 2;
}

How would I do this in ASP?
ASKER CERTIFIED SOLUTION
Avatar of HuyBD
HuyBD
Flag of Viet Nam image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
change
sub myFunction()
    if $condition1 =true then
        myFunction=1
    else
        myFunction=2;
    end if
end sub

Open in new window