|
setq
|
The setq special form is a short hand form for the set function which assigns new values to
variables. A simple set function results in a simple assignment and is uncomplicated. However, the set
function can also be used to set a new value into a target object with indexing. When indexing is used,
the results of the set function depend upon the type of target object being indexed. The result of a set
function, with indexing, are complicated because we need to know the type of target object and the types of the
indices. In all cases the setq special form converts easily into a longer set function call.
Use the setq special form when a longer set function is too cumbersome.
(setq target newValue) (setq (ref target index1) newValue) (setq (ref target index1 index2) newValue) (setq (ref target index1 index2 index3) newValue) The result of setq depends upon the type of object in the target variable.
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_ObjectRepository_setq_027
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 target The target Object Repository. ObjectRepository index1 (Optional) A target variable index. Integer index2 (Optional) A target variable index. Integer index3 (Optional) A target variable index. Integer newValue The new value for the Lambda persistent variable. Character String Symbol Vector BitVector ByteVector IntVector
FltVector ObjVector Structure Dictionary Directory
Matrix NumMatrix Integer Float Number Complex Boolean
Returns:
Examples
Argument Types
How do I contact the AIS team?