lock
|
The lock function prevents the contents of the specified symbol from being erased by the clear function.
Usage The lock function is used to prevent the contents of the specified symbol from being erased by the clear function.
For instance the following Lisp code shows how to to preserve the contents of global variables from the clear function.
(defun foo(Number:X) (cos (sqrt x)))
(foo 4.0) ;; returns -0.4161468365471
(clear)
(foo 4.0) ;; returns an unknown function error
(defun foo(Number:X) (cos (sqrt x)))
(lock foo:)
(clear)
(foo 4.0) ;; returns -0.4161468365471
(defun moo(Number:X) (cos (sqrt x)))
(lock _globals) ;; lock all non-void global symbols
(clear)
(foo 4.0) ;; returns -0.4161468365471
true)
(lock name) (lock _globals)
Expression:
Arguments
Name
Type
Description Argument: name Symbol
The name is locked and its contents will not be destroyed by the clearfunction.
Returns:
Expression:
Arguments
Name
Type
Description Argument: _globals Symbol
The special argument _globals locks all global symbols currently holding non-void contents.
No colon (:) follows the name _globals as is the case with other individual symbols.
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.
Symbol |
Here are also a number of links to functions having arguments with any of these data types.
Analytic Information Server (AIS)AIS Component Systems
|