On 3/22/06, Ed Griffiths <[EMAIL PROTECTED]> wrote:
That Depends on the type of variable.
- structures, cfc instances and java object instances are passed by reference.
- simple variables (string, numeric, etc) and arrays are passe by value. Arrays are passed by value as shallow copies (meaning any structures or objects inside the array are passed by reference).
Nope it's dependent on the type of variable as described above. Structures are returned as a reference an string is returned by value.
Probably.
Don't think so but could be wrong.
Hi
We're looking into an issue with a CFC which has raised the following
questions:
- Are variables that are returned from CFC methods returned by value or
reference?
That Depends on the type of variable.
- structures, cfc instances and java object instances are passed by reference.
- simple variables (string, numeric, etc) and arrays are passe by value. Arrays are passed by value as shallow copies (meaning any structures or objects inside the array are passed by reference).
- Is this value/reference outcome dependent on the CFC method's specified
returnType (are objects returned in a different way from, say, arrays or
structs?)
Nope it's dependent on the type of variable as described above. Structures are returned as a reference an string is returned by value.
- Is there an Adobe TechNote or similar doc on this subject that we've
overlooked?
Probably.
- Has this behaviour changed between CF versions or hotfixes?
Don't think so but could be wrong.
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
