Board index » Visual Studio » function refresher
|
rstone101SantaBarbara
|
|
rstone101SantaBarbara
|
function refresher
Visual Studio190
How can I call a function in an if statement to test it's return value.. function test1() if test2() = false then msgbox("") else msgbox("else") end if end function function test2(x) if x>100 then test2 = false end if end function Is that right? - |
| Evertjan
Registered User |
Fri Jun 11 12:59:45 CDT 2004
Re:function refresher
Dave wrote on 11 jun 2004 in microsoft.public.scripting.vbscript:
QuoteHow can I call a function in an if statement to test it's return test1( 100 ) function test1(z) if not test2(z) then ''you forgot the parameter msgbox("parameter greater than 100") else msgbox("parameter less than or equal to 100") end if end function function test2(x) if x>100 then test2 = false else test2 = true '' The result is not true by default end if end function -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress) - |
| Dave
Registered User |
Fri Jun 11 14:13:06 CDT 2004
Re:function refresher
Evertjan. wrote:
QuoteDave wrote on 11 jun 2004 in microsoft.public.scripting.vbscript: |
