[thelist] ASP equivalent of $var = ($a == 0) ? 'hello' : 'goodbye';

Kristof Neirynck k.neirynck at belgacom.net
Wed Dec 10 14:38:17 CST 2003


Joel D Canfield wrote:
>>Is the an ASP equivalent of PHP's syntax:
>>
>>$var = ($a == 0) ? 'hello' : 'goodbye';
> 
> If there's a cool 'immediate if' shortcut like the PHP versoin, I'd love
> to know it.

This should work.

Dim var as String
var = iif(a = 0, "Hello", "goodbye")


-- 
Kristof


More information about the thelist mailing list