August 2001
Intermediate to advanced
976 pages
38h 8m
English
StructUpdate
StructUpdate(structure, key, value)Updates the specified key in
structure by overwriting the existing data
with value. The following example uses
this function to update a key/value in a structure:
<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 StructUpdate(Stock, "company", "Allaire Corp.")> <CFOUTPUT> <B>Company:</B> #Stock.company#<BR> <B>Ticker:</B> #Stock.ticker#<BR> <B>Exchange:</B> #Stock.exchange#<BR> <B>Price:</B> #Stock.price#<BR> <B>Change:</B> #Stock.change#<BR> <B>Last Trade Time:</B> #Stock.lasttradetime#<BR> <B>Last Trade Date:</B> #Stock.lasttradedate#<BR> <B>Volume:</B> #Stock.volume# </CFOUTPUT>
Read now
Unlock full access