print


(print [ expression [ fileHandle ] ] )

This function prints expression to command line or to specified fileHandle.

Arguments

expression  (optional) any Lisp expression or value; if omitted, NIL is used
fileHandle  (optional) handle of a file as obtained from (open); if omitted or NIL is used, output goes to command line

Return

the evaluated value of expression, or a "void" value

Example

(setq x 123)
(print x)  123, to command line
(print x fh)  123, to opened file "fh"

Remarks

1.
if no argument is provided (prin1) a "void" symbol value is returned (effectively "nothing");
(princ) can be used as last statement in a defun scope, to return "nothing", so no result is finally output to command line

2.
same behaviour as (prin1), but adds a newline \n before expression and adds an extra space afterwards



©  Bricsys NV. All rights reserved.