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

27  Input/Output Functions


  1. get-key - get a single key stroke from the keyboard
  2. read - read an expression
  3. print - print an expression on a new line
  4. prin1 - print an expression
  5. princ - print an expression without quoting
  6. pprint - pretty print an expression
  7. terpri - terminate the current print line
  8. flatsize - length of printed representation using prin1
  9. flatc - length of printed representation using princ

(get-key) - get a single key stroke from the keyboard
returns - the decimal ASCII value of the key pressed
Note: this function is not supported on all systems

(read [stream [eof [rflag]]]) - read an expression
stream - the input stream [default is standard input]
eof - the value to return on end of file [default is NIL]
rflag - recursive read flag [default is NIL]
returns - the expression read

(print expr [stream]) - print an expression on a new line
expr - the expression to be printed
stream - the output stream [default is standard output]
returns - the expression

(prin1 expr [stream]) - print an expression
expr - the expression to be printed
stream - the output stream [default is standard output]
returns - the expression

(princ expr [stream]) - print an expression without quoting
expr - the expressions to be printed
stream - the output stream [default is standard output]
returns - the expression

(pprint expr [stream]) - pretty print an expression
expr - the expressions to be printed
stream - the output stream [default is standard output]
returns - always returns NIL

(terpri [stream]) - terminate the current print line
stream - the output stream [default is standard output]
returns - NIL

(flatsize expr) - length of printed representation using prin1
expr - the expression
returns - the length

(flatc expr) - length of printed representation using princ
expr - the expression
returns - the length

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