Sean, Got it! Many thanks for taking the time to clarify this. Now I can forget about that bug submission.
As always, your insight is greatly appreciated. chris kief -----Original Message----- From: Sean A Corfield [mailto:sean@;corfield.org] Sent: Friday, November 01, 2002 9:59 PM To: CF-Talk Subject: Re: *CFMX* variable creation - is this normal behavior? or a bug? On Friday, Nov 1, 2002, at 12:01 US/Pacific, Chris Kief wrote: > That was my understanding as well. But what I was attempting to > demonstrate was that CF is able to auto-retype certain variables and > not > others. Well, not really - see below. > <!--- auto-create a struct ---> > <cfset myStruct.foo = "bar" /> Equivalent to: <cfif not isDefined("myStruct")> <cfset myStruct = structNew()/> </cfif> <cfset myStruct.foo = "bar"/> Not that it only performs the implicit assignment of a new struct if the variable doesn't already exist. > <!--- have cf retype to string ---> > <cfset myStruct = "foo" /> > > That works fine. Yes, because you are assigning the whole variable. > <!--- create a string ---> > <cfset myString = "foo" /> Yes, makes myString a *string* > <!-- have cf retype to struct ---> > <cfset myString.1 = "foo" /> > > That fails. Yes, and correctly so: myString is a *string* at this point so you cannot access any members... This is not a bug. "SOAP is not so much a means of transmitting data but a mechanism for calling COM objects over the Web." -- not Microsoft (surprisingly!) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm

