> Can someone give me the lowdown on why...
> registrant.emergencyPhone.Phone.countryCode = 1; ...is
> equivalent to...
> registrant["emergencyPhone"]["Phone"]["countryCode"] = 1;
>
> Is this new in CFMX? I used to name variables with dots in
> them to sort of give pseudo-scopes to groups of variable.
> Maybe it's always behaved this way, but I never had occasion
> to dump one?
Yes, it is new to CFMX. However, it has _always_ been bad practice (imho) to
create variables like this. I always suggest folks go through the trouble
of:
<cfset registrant = structNew()>
<cfset registrant.emergencyPhone = structNew()>
etc
[Todays Threads]
[This Message]
[Subscription]
[Fast Unsubscribe]
[User Settings]
- Dots in variable names behaving unexpectedly Jamie Jackson
- Re: Dots in variable names behaving unexpectedly Raymond Camden
- Re: Dots in variable names behaving unexpectedly Jim McAtee
- RE: Dots in variable names behaving unexpecte... Raymond Camden
- RE: Dots in variable names behaving unexpectedly Barney Boisvert
- RE: Dots in variable names behaving unexpecte... Raymond Camden
- Re: Dots in variable names behaving unexpectedly Matt Liotta
- Re: Dots in variable names behaving unexpectedly Critter
- RE: Dots in variable names behaving unexpectedly Douglas.Knudsen