XLISP char-int

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

# char-int

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

## Syntax

(char-int char)
  char - a character expression
  returns - the decimal ASCII value as an integer

## Description

The 'char-int' function returns the decimal ASCII value of the 'char' expression.

## Examples

    (char-int #\0)              => 48
    (char-int #\A)              => 65
    (char-int #\a)              => 97
    (char-int #\[)              => 91
    (char-int #\newline)        => 10
    (char-int (code-char 127))  => 127
    (char-int (int-char 255))   => 255

Note: In Nyquist/XLISP, char-code and 'char-int' are two different functions, but behave exactly the same [Nyquist 3.03, December 2010].

See also:

- Contents → Character Functions

Back to Top

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