> On 6 Nov 00, at 9:59, Fred T. Sanders wrote:
>
> > Your right, and yes I do expect people to read the docs, I
> even read docs
> > from time to time. (don't tell anyone)
>
> Even when they aren't there? Surely you're aware that
> Allaire overlooked the
> Duplicate() function in the CF Studio docs...
>
> - Jeff
Here's what the doco says in CFstudio 4.5.2 beta2:
----------------------------------------------------------------------------
----
Chapter 2 : ColdFusion Functions
Duplicate
Returns a clone, also known as a deep copy, of a variable. The copied
variable contains no reference to the original variable.
See also StructCopy.
Syntax
Duplicate(variable_name)
variable_name
The name of the variable that is to be duplicated.
Usage
This function is very useful in duplicating complex structures, including
nested structures and queries.
Note You cannot duplicate a COM, CORBA or JAVA object returned from the
CFOBJECT tag or the CreateObject function. If any element in an array or
field of a structure is a COM, CORBA, or JAVA object, you cannot duplicate
the array or structure. If you try to duplicate an object of this sort, an
exception is thrown.
Examples
<!--- This example shows the use of Duplicate --->
<HTML>
<HEAD>
<TITLE>
Duplicate Example
</TITLE>
</HEAD>
<H3>Duplicate Example</H3>
<CFSET s1=StructNew()>
<CFSET s1.nested = StructNew()>
<CFSET s1.nested.item = "original">
<CFSET copy=StructCopy(s1)>
<CFSET clone=Duplicate(s1)>
<!--- modify the original --->
<CFSET s1.nested.item = "modified">
<cfoutput>
<P>The copy contains the modified value: #copy.nested.item#</P>
<P>The duplicate contains the original value: #clone.nested.item#</P>
</cfoutput>
</BODY>
</HTML>
----------------------------------------------------------------------------
----
HTH
Bert
------------------------------------------------------------------------------
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.