|
insert
|
The insert function destructively inserts the specified key into
the Structure at the specified index location. The Structure is increased
in size to accommodate the new value.
The insert function should be used when you want to insert a new Structure binding (key and value) into an existing Object in a specific location. The insert function will always insert, even though the key already exists, whereas the uniqueInsert function will not insert if the key already exists. The insert function is similar to the uniqueInsert function but it has the additional feature of assigning a value to the key (instead of #void) and the additional feature of being able to specify a location (instead of the end of the Structure).
(insert struct index newKey newValue) The modified structure.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Here are the links to the data types of the function arguments. Here are also a number of links to functions having arguments with any of these data types.
You can always talk with the AIS at aiserver.sourceforge.net.
Name
Description
AIS Types struct The Structure to be modified. Structure index The position in the structure to put the new binding Integer newKey The new Key to insert. Symbol newValue The new value to insert. Character String Symbol Vector BitVector ByteVector IntVector
FltVector ObjVector Structure Dictionary Directory
Matrix NumMatrix Integer Float Number Complex
Returns:
Examples
Argument Types
Structure
Dictionary
Directory
Vector
Matrix
FltVector
ShortVector
IntVector
NumVector
ObjVector
Integer
String
Text
Symbol
NumMatrix
How do I contact the AIS team?