as far as i can tell you get a reference to it even when passing it
into a function:
here is a really, really lame test script to see what happens:
<cffunction name="tester">
<cfargument name="mystruct" type="struct">
<cfset arguments.mystruct.user = "bill">
<cfdump var="#arguments.mystruct#">
</cffunction>
<cfset test = structNew()>
<cfset test.user="bob">
<cfset test.id="ted">
<cfset tester(test)>
<cfdump var="#test#">
you will see you get the same dump from each struct.
On Thu, 18 Nov 2004 11:36:43 +1300, Tim Van Der Hulst
<[EMAIL PROTECTED]> wrote:
> > So in this case you're basically duplicating the structure? If I
> change the form value inside the CFC, does it change the corresponding form
> value outside it? Just trying to make sure that it's a copy, and not a
> reference to the outside scope.
>
> No you get a reference to the structure not a copy.
> (Well at least I think thats the case anyway...)
>
> If you wanted a copy you'd have to use the Duplicate or StructCopy functions
> ;)
>
> TiM
>
> ##
> ##
>
>
> ----------------------------------------------------------
> You are subscribed to cfcdev. To unsubscribe, send an email
> to [EMAIL PROTECTED] with the words '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
> [EMAIL PROTECTED]
>
--
Bill
http://blog.rawlinson.us
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words '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
[EMAIL PROTECTED]