tag:blogger.com,1999:blog-15254360.post112364734046625480..comments2023-09-14T16:10:55.378+08:00Comments on Code-a-holic: The Mexican IF in VBScriptBruce M. Axtenshttp://www.blogger.com/profile/14797830611260628579noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-15254360.post-1124350173438031722005-08-18T15:29:00.000+08:002005-08-18T15:29:00.000+08:00D'oh!This is part of the reason I got this blog of...D'oh!<BR/><BR/>This is part of the reason I got this blog off the ground ... I need the odd reality check which your comment graciously provides. Thanks!<BR/><BR/>--Bruce.Bruce M. Axtenshttps://www.blogger.com/profile/14797830611260628579noreply@blogger.comtag:blogger.com,1999:blog-15254360.post-1124307511186919392005-08-18T03:38:00.000+08:002005-08-18T03:38:00.000+08:00What's wrong with Function IIF(c, t, f) ...What's wrong with<BR/><B><BR/> Function IIF(c, t, f)<BR/> Dim ret<BR/> If c Then<BR/> ret = Eval(t)<BR/> Else<BR/> ret = Eval(f)<BR/> End<BR/> IIF = ret<BR/> End Function<BR/><BR/> j = IIF(i=1, "i", "i*i")<BR/></B><BR/>That seems to be what you're looking for — the lazy evaluation of <B>t</B> and <B>f</B>, not lazy evaluation of <BAnonymousnoreply@blogger.com