STRUCTINSERT

I l @ ve RuBoard

Used to insert new key-value pairs into an already existing structure. Returns "Yes" if the key-value pair was inserted and "No" if it was not.

Syntax

 StructInsert(structure_to_insert_into, name_of_key, value[,allowoverwrite]) 

Parameters

StructInsert must know what structure it is working with, what the name of the key will be, and what corresponding value is to be inserted into the structure.

Allowoverwrite is a parameter of the function and it is set to either true or false, with false being the default. This parameter determines whether or not to overwrite a value if the key being inserted already exists.

Example

 <cfset personinfo = StructNew()>  <cfset bool = StructInsert(personinfo, "First_Name", Malia)> <cfset bool = StructInsert(personinfo, "Last_Name", Schmidt)> 
I l @ ve RuBoard


Macromedia ColdFusion 5. Training from the Source
Macromedia ColdFusion 5 Training from the Source (With CD-ROM)
ISBN: 0201758474
EAN: 2147483647
Year: 2002
Pages: 99
Authors: Kevin Schmidt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net