>> Does CFML support variable variables?
>>
>> In PHP you can define a variable and then define another
>> variable to point to it, e.g.:
>>
>> $i = 123;
>> $j = $$i;
>> print $j;
>> // output is "123"
>>
>> Is there something similar in CFML?  At a cursory glance
>> of
>> the books I have looks like it isn't possible.
>>
>> In my situation I've got variables with pretty long
>> names, e.g.
>> #Application.language.circuitname.stringname# and would
>> like
>> to be able to reference it by a shorter method, e.g.
>> circuitlang.stringname, while still retaining the
>> Application
>> scope.

> If the variable is a query or structure, this happens
> automatically, as both
> are passed by reference.

Everything other than simple values (strings and numbers) and arrays
are passed as a pointer to the object and then you can use duplicate()
to create a copy instead of a pointer. strings, numbers and arrays are
only ever passed by value, so if you want a pointer to one, you have
to place it in a structure and point to the structure.

s. isaac dealey   954.927.5117

new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework
http://www.sys-con.com/story/?storyid=44477&DE=1
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to