If you call the test method in this component, why does abc show the
original value that is passed in, even after it has been reset with the
cfset? For example, if you call it like obj.test('foo'), the first cfoutput
displays abc=foo, arguments.abc=foo, and then the second output displays
abc=foo, arguments.abc=123. Shouldn't abc=123?
Similarly, if you run test2, only abc is displayed as 123, arguments.abc
still shows 'foo'. I thought abc and arguments.abc should be the same
thing, but apparently they're not.
<cfcomponent>
<cffunction name="test">
<cfargument name="abc" type="string">
<cfoutput>abc = #abc#, arguments.abc =
#arguments.abc#<br></cfoutput>
<cfset arguments.abc = '123'>
<cfoutput>abc = #abc#, arguments.abc =
#arguments.abc#</cfoutput>
</cffunction>
<cffunction name="test2">
<cfargument name="abc" type="string" default="foo">
<cfoutput>abc = #abc#, arguments.abc =
#arguments.abc#<br></cfoutput>
<cfset abc = '123'>
<cfoutput>abc = #abc#, arguments.abc =
#arguments.abc#</cfoutput>
</cffunction>
</cfcomponent>
***
The information in this email is confidential and intended solely for the individual
or entity to whom it is addressed. If you have received this email in error please
notify the sender by return e-mail, delete this email, and refrain from any disclosure
or action based on the information.
****
----------------------------------------------------------
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]