On Sat, Jan 30, 2010 at 11:08 AM, J.Lucido <[email protected]> wrote:
> <cfscript>
>        variables.aStrVar = 'my test string';
>        variables.stTest_1 = {key1 = 'my test string'};
>        variables.stTest_2 = {key1 = aStrVar};
>        variables.stTest_3 = {key1 = '#aStrVar#'};
>        // variables.stTest_4 = {key1 = #aStrVar#};
>        // variables.stTest_5 = {key1 = variables.aStrVar};
>        // variables.stTest_6 = {key1 = #variables.aStrVar#};
>        // variables.stTest_7 = {key1 = '#variables.aStrVar#'};
> </cfscript>
> <cfoutput>Test string: #aStrVar#</cfoutput><br/>
> <cfdump var="#stTest_1#">
> <cfdump var="#stTest_2#">
> <cfdump var="#stTest_3#"><!---
> <cfdump var="#stTest_4#">
> <cfdump var="#stTest_5#">
> <cfdump var="#stTest_6#">
> <cfdump var="#stTest_7#"> --->
>
> The first struct is created without issue since I am defining the
> string along with the key name. The second and third struct
> declarations do not throw errors however they create a key value of a
> zero length string. Struct test cases 4-7 throw server errors (bad
> file exception: Problem occurred while parsing: Encountered invalid
> token after "#").

I don't have CF8/CF9 handy to test on (I haven't installed them on my
new development machine) but I tried on Railo and all seven examples
work (and create a struct with key1's value equal to my test string).
So, yes, I think they should all work.
-- 
Sean A Corfield -- (904) 302-SEAN
Railo Technologies US -- http://getrailo.com/
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

-- 
Open BlueDragon Public Mailing List
 http://www.openbluedragon.org/   http://twitter.com/OpenBlueDragon
 mailing list - http://groups.google.com/group/openbd?hl=en

 !! save a network - please trim replies before posting !!

Reply via email to