Symbols

System properties of the symbol

  Value, definition of a method, class and vector of properties can be linked to the symbol or with its name. Besides, different data can be linked to the symbol, looking in what space of names it to consider.
  For reading and checks of values of various system properties there are predicates and functions.

Valueboundp
Classgetclass
Methodgetmethod
Propertiesget

Operation with appearance of the symbol

  Appearance (name) of the symbol can be studied, having transformed it in string, for example, function string which returns string of a name of atom as value:

>('H2O string)
"h2o"

  The name can be divided into characters, having made from them the list by means of function list:

>(('H2O string) list)
(#\h #\2 #\o)

  In the new form of representation it is possible to work with single characters, with them it is possible to carry out calculations and to build of them new symbols. It is necessary, for example, for operation with natural language words.
  For symbol creation it is possible to use function symbol which includes in system, brings into an object box and in space of names the symbol with a name set by string.

>("C2H5OH" symbol)
c2h5oh

GENSYM creates the new symbol

  For creation of symbols it is possible to use the Lisp symbol generator (symbol gensym) which can generate new symbols. The symbol name is made of the set initial symbol and from a serial number of the generated symbol as a suffix:

>('symbol- gensym)
symbol-1
>('symbol- gensym)
symbol-2
>(nil gensym)
t3
; t - has started by default

  It is guaranteed, that the symbol returned by function always is new: if, for example, symbol symbol-2 is for any reason already in the objects box gensym would return as value symbol symbol-3 (if it was not already in the use).