This is why I have started telling the people at this location that if they can not remember when to use "brackets" instead of Evaluate to just always use "brackets" when referencing things like form variables. 
 
Just for kicks I just ran a search for Evaluate( against the "framework" used here and was found 658 times.  Now this thing was written back in the days of CF4 so maybe some of them can be justified but then again that is a LOT of instances.  My personal favorite as I skimmed the search results:
 
<cfset Temp = SetVariable("Caller." & Variables.Variable, Evaluate("Request.g#Variables.Ask#")) />

 
On 5/18/06, Ben Nadel <[EMAIL PROTECTED]> wrote:
My biggest problem with evaluate is not so much the method itself, but rather, that majority of the time that I see it, it reprsents a core misunderstanding of how the language can be leveraged. For instance, I see things like this A LOT!
 
<cfset objValue = Evaluate("FORM." & strFieldName) />
 
Does it work? Yes. But it clearly demonstrates a misunderstanding of scope usage:
 
<cfset objValue = FORM[ strFieldName ] />
 
Much cleaner and easier to read and one step less than the evaluate method.
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).

An archive of the CFCDev list is available at www.mail-archive.com/[email protected]

Reply via email to