XLISP symbol-name

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference

# symbol-name

Type: | - | function (subr)
Source: | - | xlbfun.c

## Syntax

(symbol-name symbol)
  symbol - an expression that evaluates to a symbol name
  returns - the symbol's print name

## Description

The 'symbol-name' function takes the 'symbol' expression and returns the printable string of the 'symbol'. If the 'symbol' had not existed, then it will be created and interned into the system symbol table *obarray* , but with it's value unbound and an empty property list.

## Examples

    (symbol-name 'foo)        ; returns "FOO"
    (symbol-name 'gleep)      ; returns "GLEEP"

    (setq my-symbol 'flop)    ; define MY-SYMBOL
    (symbol-name my-symbol)   ; returns "FLOP"

XLISP Bug: The 'symbol-name' function signals a 'bad argument type' error with the symbol NIL [Nyquist 3.03 in December 2010].

Back to Top

Nyquist / XLISP 2.0 - Contents | Tutorials | Examples | Reference