August 2001
Intermediate to advanced
976 pages
38h 8m
English
StructCopy
StructCopy(structure)Makes an exact copy of the specified structure. This copy isn’t
by reference, meaning that any changes made to the original structure
aren’t reflected in the copy. You should note that the
StructCopy( ) function shouldn’t be used to
copy deeply nested structures. If you need to copy nested structures,
use the Duplicate( ) function instead. The
following example demonstrates the use of the StructCopy( ) function:
<CFSET Stock = StructNew( )> <CFSET Stock.Company = "Allaire"> <CFSET Stock.Ticker = "ALLR"> <CFSET Stock.Exchange = "NASDAQ"> <CFSET Stock.Price = "66.25"> <CFSET Stock.Change = "+0.375"> <CFSET Stock.LastTradeTime = "10:17AM"> <CFSET Stock.LastTradeDate = "05/17/1999"> <CFSET Stock.Volume = "8300"> <CFSET StockCopy = StructCopy(Stock)> <CFOUTPUT> <B>Company:</B> #StockCopy.company#<BR> <B>Ticker:</B> #StockCopy.ticker#<BR> <B>Exchange:</B> #StockCopy.exchange#<BR> <B>Price:</B> #StockCopy.price#<BR> <B>Change:</B> #StockCopy.change#<BR> <B>Last Trade Time:</B> #StockCopy.lasttradetime#<BR> <B>Last Trade Date:</B> #StockCopy.lasttradedate#<BR> <B>Volume:</B> #StockCopy.volume# </CFOUTPUT>
Read now
Unlock full access