Aidan,

I wonder why you tried the ugly version first.  Forget the ampersands, forget
SetVariable.  Maybe forget the vairables scoping as well.  Just do this:
<CFSET "variables.abc#Evaluate(somevalue + 1)#" = "whatever">

Now doesn't that look much MUCH nicer than this:
<CFSET variables.Result = Evaluate("variables.abc" & variables.somevalue +
1, "whatever")>

I mean to say, what the hell is all THAT about?

Bjork.


---------------------------

From: Aidan Whitehall <[EMAIL PROTECTED]>
I tried to do something like this a while ago

<CFSET "variables.abc" & Evaluate(variables.somevalue + 1) = "whatever">

and it fails (no function call on the LHS of an equals sign, or something
like that).

SetVariable to the rescue:

<CFSET variables.Result = Evaluate("variables.abc" & variables.somevalue +
1, "whatever")>

Ever since finding that out, I've avoided naming variables in the way you've
described above. I don't think there's anything inherently wrong with it
(you could create the variable name using another CFSET prior to this one),
but SetVariable just seems a bit more elegant.


-- 
Aidan Whitehall <[EMAIL PROTECTED]>
Netshopper UK Ltd


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebarRsts

Reply via email to