411 REFERENCE · Wikibooks
Coding Cookbook/Inline If
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Not every language offers an Inline If function.
VBScript solution
function IIf (boolValue, varTrue, varFalse) ' Inline If
if boolValue then IIf = varTrue else IIf = varFalse
end function
strFoo = IIf( 1>2, "x", "y" ) ' result: strFoo = "y"
Inline If
Inline If