XLISP :white-space

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

# :white-space

Type: | - | keyword
Source: | - | xlread.c

## Syntax

:white-space

## Description

The ':white-space' keyword is an entry that is used in the *readtable* system variable that contains XLISP's data structures relating to the processing of characters from the user [or files] and read-macro expansions. The existance of the ':white-space' keyword means that the specified character may be skipped over. The system defines that 'tab', 'space', 'return' and 'line-feed' are ':white-space' characters.

## Examples

    ;; define a function to look in a table
    ;; and print out any white-space characters

    (defun look-at (table)
      (dotimes (ch 127)
        (prog ((entry (aref table ch)))
          (case entry
            (nil          nil)
            (:constituent nil)
            (:white-space (print ch))
            (t            nil))))
      (terpri))

    (look-at *readtable*)  ; prints  9   - tab
                           ;         10  - newline
                           ;         12  - formfeed
                           ;         13  - return
                           ;         32  - space

Caution: If you experiment with *readtable* , it is useful to save the old value in a variable, so that you can restore the system state.

See the :white-space keyword in the XLISP 2.0 manual.

Back to Top

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