Can you post the code that is offending? You'd use () Parenthesis to group statements, for example
<cfif (this EQ 1 AND that EQ 1) OR somethingElse EQ 2> </cfif> Taco Fleur 0421 851 786 Tell me and I will forget Show me and I will remember Teach me and I will learn > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf > Of Andrew Dickinson > Sent: Monday, 3 November 2003 7:38 PM > 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 > [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
