BLOCK 1: Yes local.myVar only exists within the function. BLOCK 2: Yes VARIABLES.local.myVar exists globally within the component.
BLOCK 3: In your third block of code local.myVar exists globally within the component. (It would also _not_ overwrite or conflict with local.myVar in your first block) Adam Wayne Lehman Web Systems Developer Johns Hopkins Bloomberg School of Public Health Distance Education Division -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bryan F. Hogan Sent: Monday, October 06, 2003 11:52 AM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] Variable referencing in CFCs <cffunction> <cfset var local=structNew()> <cfset local.myVar='test'> <cfreturn local> </cffunction> In the above example local.myVar exist only in that function? <cffunction> <cfset Variables.local=structNew()> <cfset Variables.local.myVar='test'> <cfreturn Variables.local> </cffunction> Variables.local exists within the component? <cffunction> <cfset local=structNew()> <cfset local.myVar='test'> <cfreturn local> </cffunction> Does local now exist in the component, or the function? Thanks for your help, this to me is confusing. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Bryan F. Hogan Sent: Monday, October 06, 2003 11:46 AM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] Variable referencing in CFCs So local.myVar will only be available within a function and not the entire CFC? ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]
