On Wed, 1 Dec 2004 13:43:01 +1100, Steve Onnis <[EMAIL PROTECTED]> wrote:What I am trying to do is something like this IIF(isDefined("myVar"), "'the value myVar is '" & "myVar", "''")
Nope, you can't do that. iif() always evaluates all three arguments (and iif() is evil anyway - it is not the way to write clear code).
Bah.. I hear this drivel all the time. For anyone who's use to seeing IIF() I guess they'd wonder what all the fuss is about. Certainly I use to use the thing in Excel spreadsheet formulas (well IF() in xls) in days before CF -- seeing it in ColdFusion never seemed to phase me.
IIF() remains the ideal solution for conditional logic in a pinch, like the classic alternate background colour snippet:
<tr bgcolor="#IIF(currentrow MOD 2, de("ccffcc"), de("ccffff"))#">
But heh, each to his own :)
-- geoff http://www.daemon.com.au/
--- You are currently subscribed to cfaussie as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
