Just doing some CFC development at the moment and am working with some local variables within the CFFunction tags.
These should be initialised with var as previously documented on other sites.
I was converting some CFSCRIPT code into the custom function that I was writing and so I dutifully initialised my local variable as the first line of the code, only to get an error when I ran the code telling me that the local variable must be "grouped at the top of the function body".
Interesting thing this reveals is that any var statements must come at the beginning of the CFFunction code and that seems to even include coming before the CFSCRIPT tag. Modifying the code to initialise the variable with a CFSET ended the error message.
Andrew
Posted by at 12:51 PM | Permalink
Trackback: http://blog.daemon.com.au/cgi-bin/dmblog/mt-tb.cgi/62

