Why does this fail???

        <cfif isStruct(variables)>

Rather, all I'm trying to do is print the Variables structure.  How?

Robert Hinojosa
WebDeveloper
512.912.3775
[EMAIL PROTECTED]
www.cirrus.com

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Monday, August 28, 2000 12:36 PM
To: [EMAIL PROTECTED]
Subject: RE: Request scope (RE: No more need for cflock!!)


Unfortunately, they don't really end up in a structure.  Try the following:

   <cfset UserInfo.username = 'bubbajones'>
   <cfset UserInfo.firstname = 'bubba'>
   <cfset UserInfo.lastname = 'jones'>
   <cfloop collection="#UserInfo#" item="key">
      <cfoutput>#key#<br></cfoutput>
   </cfloop> 

It won't work.  You need to explicitly define it as a structure, e.g:

   <cfset UserInfo = StructNew()>
   <cfset UserInfo.username = 'bubbajones'>
   <cfset UserInfo.firstname = 'bubba'>
   <cfset UserInfo.lastname = 'jones'>
   <cfloop collection="#UserInfo#" item="key">
      <cfoutput>#key#<br></cfoutput>
   </cfloop>

So, yay you can create your own "scopes", but they're really nothing more
than broken structures.  Alas.

At 8:35 AM -0800 8/28/00, McCollough, Alan wrote:
>That does make sense; I believe that all variables end up in a structure,
it
>just happens, if it as you say, that I'm making a structure in a structure,
>with Variables. being the outlying structure, and SQL. being the inner
>structure...

----------------------------------------------------------------------------
--
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to