insert
|
The insert function destructively inserts the specified object into the Vector
or any Vector subtypes
at the specified index location. 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 destructively inserts the specified key into
the Dictionary at the specified index location. The
Dictionary is increased
in size to accommodate the new value. The insert function destructively inserts the specified key into
the Directory at the specified index location. The Directory is increased
in size to accommodate the new value. The insert function destructively inserts the specified object into
the Matrix at the specified index location. The insert function destructively inserts the specified object into
the NumMatrix at the specified index location. Usage The insert function should be used when you want to insert a new object into
an existing Vector in a specific location in the Vector. The insert function
will always insert, even though the object already exists, whereas the uniqueInsert
function will not insert if the object already exists. If the specified index is
already occupied, then that object and all remaining objects to the right will be
shifted to the right to make room for the new object. 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).
The insert function should be used when you want to insert a new Dictionary
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
Dictionary).
The insert function should be used when you want to insert a new Directory 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
Directory).
Note: Returns an error message if the Matrix is not of rank one. The insert function should be used when you want to insert a new object into
an existing Matrix in a specific location in the Matrix. The insert function
will always insert, even though the object already exists, whereas the uniqueInsert
function will not insert if the object already exists. If the specified index is
already occupied, then that object and all remaining objects to the right will be
shifted to the right to make room for the new object. Note: Returns an error message if the NumMatrix is not of rank one. The insert function should be used when you want to insert a new object into
an existing NumMatrix in a specific location in the NumMatrix. The insert function
will always insert, even though the object already exists, whereas the uniqueInsert
function will not insert if the object already exists. If the specified index is
already occupied, then that object and all remaining objects to the right will be
shifted to the right to make room for the new object. Structure
Dictionary
Directory
Matrix
NumMatrix
Structure
Dictionary
Directory
Matrix
NumMatrix
(insert vector index obj) The modified Vector.
(insert struct index newKey newValue) The modified structure.
(insert dictionary index newKey newValue) The modified dictionary.
(insert directory index newKey newValue) The modified Directory.
(insert matrix index obj) The modified Matrix.
(insert nummatrix index obj) The modified NumMatrix.
Expression:
Arguments
Name
Type
Description Argument: vector Vector FltVector ShortVector IntVector NumVector ObjVector
The Vector to be modified. Argument: index Integer
The location in the vector to install the new value. Argument: obj Character String Symbol Vector BitVector ByteVector IntVector
FltVector ObjVector Structure Dictionary Directory
Matrix NumMatrix Integer Float Number Complex
The new object to insert.
Returns:
Expression:
Arguments
Name
Type
Description Argument: struct Structure
The Structure to be modified. Argument: index Integer
The position in the structure to put the new binding Argument: newKey Symbol
The new Key to insert. Argument: newValue Character String Symbol Vector BitVector ByteVector IntVector
FltVector ObjVector Structure Dictionary Directory
Matrix NumMatrix Integer Float Number Complex
The new value to insert.
Returns:
Expression:
Arguments
Name
Type
Description Argument: dictionary Dictionary
The Dictionary to be modified. Argument: index Integer
The position in the structure to put the new binding Argument: newKey Symbol
The new Key to insert. Argument: newValue Character String Symbol Vector BitVector ByteVector IntVector
FltVector ObjVector Structure Dictionary Directory
Matrix NumMatrix Integer Float Number Complex
The new value to insert.
Returns:
Expression:
Arguments
Name
Type
Description Argument: directory Directory
The Directory to be modified. Argument: index Integer
The position in the directory to put the new binding Argument: newKey Symbol
The new Key to insert. Argument: newValue Character String Symbol Vector BitVector ByteVector IntVector
FltVector ObjVector Structure Dictionary Directory
Matrix NumMatrix Integer Float Number Complex
The new value to insert.
Returns:
Expression:
Arguments
Name
Type
Description Argument: matrix Matrix
The Matrix to be modified. Argument: index Integer
The location in the Matrix to install the new value. Argument: obj Character String Symbol Vector BitVector ByteVector IntVector
FltVector ObjVector Structure Dictionary Directory
Matrix NumMatrix Integer Float Number Complex
The new object to insert.
Returns:
Expression:
Arguments
Name
Type
Description Argument: nummatrix NumMatrix
The NumMatrix to be modified. Argument: index Integer
The location in the NumMatrix to install the new value. Argument: obj Character String Symbol Vector BitVector ByteVector IntVector
FltVector ObjVector Structure Dictionary Directory
Matrix NumMatrix Integer Float Number Complex
The new object to insert.
Returns:
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.
Structure | Dictionary | Directory | Vector |
Matrix | FltVector | ShortVector | IntVector |
NumVector | ObjVector | Integer | String |
Text | Symbol | NumMatrix |
Here are also a number of links to functions having arguments with any of these data types.
Analytic Information Server (AIS)AIS Component Systems
|