XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

13  Symbol Functions


  1. set - set the value of a symbol
  2. setq - set the [quoted] value of a symbol
  3. psetq - parallel version of setq
  4. setf - set the value of a field
  5. defun - define a function
  6. defmacro - define a macro
  7. gensym - generate a symbol
  8. intern - make an interned symbol
  9. make-symbol - make an uninterned symbol
  10. symbol-name - get the print name of a symbol
  11. symbol-value - get the value of a symbol
  12. symbol-function - get the functional value of a symbol
  13. symbol-plist - get the property list of a symbol
  14. hash - compute the hash index for a symbol

(set sym expr) - set the value of a symbol
sym - the symbol being set
expr - the new value
returns - the new value

(setq [sym expr]...) - set the [quoted] value of a symbol
sym - the symbol being set [quoted]
expr - the new value
returns - the new value

(psetq [sym expr]...) - parallel version of setq
sym - the symbol being set [quoted]
expr - the new value
returns - the new value

(setf [place expr]...) - set the value of a field
place - the field specifier [quoted]:
sym - set value of a symbol
(car expr) - set car of a cons node
(cdr expr) - set cdr of a cons node
(nth n expr) - set nth car of a list
(aref expr n) - set nth element of an array
(get sym prop) - set value of a property
(symbol-value sym) - set value of a symbol
(symbol-function sym) - set functional value of a symbol
(symbol-plist sym) - set property list of a symbol
expr - the new value
returns - the new value

(defun sym fargs expr...) - define a function
(defmacro sym fargs expr...) - define a macro
sym - symbol being defined [quoted]
fargs - formal argument list [lambda list] [quoted]
expr - expressions constituting the body of the function [quoted]
returns - the function symbol

(gensym [tag]) - generate a symbol
tag - string or number
returns - the new symbol

(intern pname) - make an interned symbol
pname - the symbol's print name string
returns - the new symbol

(make-symbol pname) - make an uninterned symbol
pname - the symbol's print name string
returns - the new symbol

(symbol-name sym) - get the print name of a symbol
sym - the symbol
returns - the symbol's print name

(symbol-value sym) - get the value of a symbol
sym - the symbol
returns - the symbol's value

(symbol-function sym) - get the functional value of a symbol
sym - the symbol
returns - the symbol's functional value

(symbol-plist sym) - get the property list of a symbol
sym - the symbol
returns - the symbol's property list

(hash sym n) - compute the hash index for a symbol
sym - the symbol or string
n - the table size [integer]
returns - the hash index [integer]

XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next