lock

 

 

Overview

The unlock function allows the contents of the specified symbol to be erased by the clear function.

Usage

The unlock function is used to allow the contents of the specified symbol to be 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
(unlock foo:)
(clear)
(foo 4.0) ;; returns an unknown function error
true)

 

Syntax


Expression:

(unlock name)


Arguments Name Type Description
Argument:nameSymbol The name is unlocked and its contents will be destroyed by the clearfunction.

Returns: The return value is always ignored


 

Examples

Here are a number of links to Lambda coding examples which contain this instruction in various use cases.

 

Argument Types

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.

++ += /= *=
-- -= addMethod append
apply binaryInsert binarySearch boolean
cdr character compareEQ compareGE
compareGT compareLE compareLT compareNE
compare comparison compress cons
count debug defchild defclass
define(macro) define defmacro defmethod
deforphan defriend defun delete
dimension disassemble display downcase
encode gc getGlobalValue getSymbolTable
globalBinding insert inside inspect
integer isAtom isBitVector isBoolean
isByteVector isCharAlphabetic isCharAlphanumeric isCharLowercase
isCharName isCharNumeric isCharUppercase isCharWhitespace
isChar isCharacter isComplex isDate
isDictionary isDirectory isEqual isError
isFloatVector isIdentical isInside isIntegerVector
isInteger isLambda isMatrix isMember
isMoney isNumberMatrix isNumberVector isNumber
isObjectVector isObject isPair isPcodeVector
isString isStructure isSymbol isText
isType isVector length list
lock macroReplace makeQuotedList makeQuotedSymbol
member methodsOf money new
number offset openLog pair
parent parse pointer proplist
proprecord putprop qt ref
remProp remove rename saveObject
saveRepository setCar setCdr setLastCdr
set setf setq sizeof
sql string svmRegression symbolToTypeCode
symbol type uniqueInsert unlock
vectorFill writelg writeln

Analytic Information Server (AIS)

AIS Component Systems

  • Smartbase Engine
  • QT C++ Libraries
  • MySQL Relational Database
  • AIS Lisp Libraries
  • Rapid Analytic Demo IDE