They should function the same in MX as in previous versions. If they are
causing an odd error then that's a bug, and a fairly major one I should say.
We'd have noticed it by now, you'd think. 

You still need to use parentheses with a cfscript if() .

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:bounce-cfaussie-
> [EMAIL PROTECTED] On Behalf Of Andrew Dickinson
> Sent: Monday, 3 November 2003 9:38 p.m.
> To: CFAussie Mailing List
> Subject: [cfaussie] RE: CFIF with () causing errors
> 
> Just to clarify -
> 
> () are superfluous in MX, but still necessary in previous versions,
> especially 4 ?
> 
> Are there circumstances where () would still be necessary or, at least,
> not harmful (i.e. causing odd errors) ?
> 
> 
> 
> > Hi Andrew,
> > You don't require the parenthesis in this case, and as long as the
> > expression evaluates to a Boolean value it should work fine.
> >
> > eg:
> >   <cfif SomeCondition>
> >     = true / 1 / yes
> >   <cfelse>
> >     = false / 0 / no
> >   </cfif>
> >
> >   <cfif not SomeCondition>
> >     = false / 0 / no
> >   <cfelse>
> >     = true / 1 / yes
> >   </cfif>
> >
> >   <cfscript>
> >     if(SomeCondition)
> >       = true / 1 / yes
> >     else
> >       = false / 0 / no
> >
> >     if(not SomeCondition)
> >       = false / 0 / no
> >     else
> >       = true / 1 / yes
> >   </cfscript>
> >
> >
> > If SomeCondition will not evaluate as Boolean, then you can wrap it in a
> > function to get the result you want.
> >
> > eg:
> >   <cfif len(SomeCondition)>
> >     = true / 1 / yes
> >   </cfif>
> >
> >   <cfscript>
> >     if(not isNumeric(SomeCondition))
> >       = false / 0 / no
> >     else
> >       = true / 1 / yes
> >   </cfscript>
> >
> >
> > Is this what you are after?
> >
> > Regards,
> >
> > Ben
> > http://www.daemon.com.au/
> >
> >
> >
> > -----Original Message-----
> > Is the use of () in a CFIF tag problematic in MX ?
> > <CFIF (SomeCondition)>
> 
> ---
> You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
> To unsubscribe send a blank email to leave-cfaussie-
> [EMAIL PROTECTED]
> 
> MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
> http://www.mxdu.com/ + 24-25 February, 2004




---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to