Structural Informatics Group (SIG) logo
Home | Projects | Demos | Downloads | Publications | Local Info | About Us | New site
Go to the first, previous, next, last section, table of contents.

digit-char

digit-char

type: function (subr) 
location: built-in
source file: xlstr.c 
Common LISP compatible: similar
versions: all machines

SYNTAX

(digit-char <int> )
        <int>           -       an integer expression

DESCRIPTION

The DIGIT-CHAR function takes an integer expression <int> and converts it into a decimal digit character. So, an integer value of 0 produces the character #\0. An integer value of 1 produces the character #\1 and so on. If a valid character can be produce it is returned, otherwise a NIL is returned.

EXAMPLES

(digit-char 0)                          ; returns #\0
(digit-char 9)                          ; returns #\9
(digit-char 10)                         ; returns NIL

COMMON LISP COMPATIBILITY: Common LISP supports the use of an optional radix parameter. This option specifies numeric base. This allows the DIGIT-CHAR to function properly for hexadecimal digits (for example). Common LISP supports up to base 36 radix systems. XLISP does not support this radix parameter. Common LISP also supports a font parameter which XLISP does not.


Go to the first, previous, next, last section, table of contents.