XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next

streamp


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

Syntax

(streamp expr)
expr - the expression to check
returns -  T  if the value is a stream, NIL otherwise

Description

The 'streamp' predicate function checks if an 'expr' is a stream.  T  is returned if 'expr' is a stream, NIL is returned otherwise.

EXAMPLES

(streamp *standard-input*)             ; returns T - stream
(streamp *debug-io*)                   ; returns T - stream
(streamp (make-string-output-stream))  ; returns T - stream

(setq a *standard-output*)
(streamp a)                            ; returns T - evaluates to stream

(streamp "a")                          ; returns NIL - string
(streamp #\a)                          ; returns NIL - character
(streamp '(a b c))                     ; returns NIL - list
(streamp 1)                            ; returns NIL - integer
(streamp 1.2)                          ; returns NIL - float
(streamp '*debug-io*)                  ; returns NIL - symbol
(streamp 'a)                           ; returns NIL - symbol
(streamp #(0 1 2))                     ; returns NIL - array
(streamp NIL)                          ; returns NIL - NIL

See the streamp predicate function in the XLISP 2.0 manual.

  Back to Top


XLISP > XLISP 2.0  -  Contents  -  Reference  -  Previous | Next