Sean Corfield <[EMAIL PROTECTED]> wrote:
> Sorry, I really don't like to see subtle side-effects like that
No need to apologize, I totally agree with you. A side effect like
that would be very poor practice. Maybe something like this would have
been better...
<cfscript>
function queryInstance( query, name ) {
"#ARGUMENTS.name#" = ARGUMENTS.query;
return "#ARGUMENTS.name#";
}
</cfscript>
<cfoutput query="#queryInstance( Instance.returnQuery(), "instanceQuery" )#">
#instanceQuery.column1#<br />
</cfoutput>
or...
<cfoutput query="#queryInstance( Instance.returnQuery(),
"VARIABLES.instanceQuery" )#">
#VARIABLES.instanceQuery.column1#<br />
</cfoutput>
> I find this far harder to read than the code it replaced!
Again, no augments here :o)
Plus it seems like a lot of work to allow the omission of a single
line of code - though I certainly know what its like to have a line of
code that bugs you because it just seems like there should be a better
way.
> but it does show a devious mind at work Robert!
Thanks! Always good to be a little devious :o)
Rob Blackburn
http://www.rbdev.net
----------------------------------------------------------
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]