|
setf
|
The setf Special Form compiles a call to the saveImmediate function, which allows values
to be stored in the specified ObjectRepository {aGor} as immediate values in the Repository Index.
The saveImmediate function replaces the pointer value with the immediate value from retrieved
from the disk. Thus, if the Object Repository file is closed, the Repository Index is saved in its
modified state. If another Object Repository references causes the Object Repository to be opened
and the Repository Index to be loaded into virtual memory, the result of the saveImmediate from the
last reference is persists in the Repository Index.
After the statement (setf gor "three" "mighty")
Any value may be stored in the ObjectRepository and associated with key. Both the key and the stored
value may be of arbitrary complexity. An object may be removed from the ObjectRepository by storing
the value #void in association with its previous key.
When to use The setf function should be used on values that are referenced many times during an
execution of an Lambda or function as it eliminates a disk access and will result in optimized
access times. The Repository Index will be dynamically resized to accommodate immediate values
and can grow to any size limited only by available virtual memory
(setf aGor key newValue) Returns the ObjectRepository
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Example_ObjectRepository_setf_001
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 aGor An Object Repository ObjectRepository key The key to be associated with the new value. Symbol newValue The new value to be associated with the key. String
Returns:
Examples
Argument Types
ObjectRepository
Symbol
Boolean
String
How do I contact the AIS team?