SubL/examples.print

From Public Domain Knowledge Bank
Revision as of 03:10, 8 March 2019 by DavidWhitten (talk | contribs) (print w/ 0 arguments)
Jump to: navigation, search

SubL/examples.1

SubL/examples.IO

print w/ 0 arguments is ERROR

CYC(#): (print)
Error: Cannot make an arity 0 function from #<Function PRINT> {req=1 ...}

print w/ 2 arguments

CYC(#):(print "hello" #$Lenat)
Error: #$Lenat is not of type: OUTPUT-TEXT-STREAM.
CYC(#): (print "hello" "world")
[Time: 0.006 secs]
"hello"

print w/ 2+ arguments

CYC(#): (print "hello" "world" #$Lenat)
Error: Cannot make an arity 3 function from #<Function PRINT> {req=1 opt=1 allowsrest=false}

print w/ 1 argument

(print "hello")
CYC(#): (print "hello")
"hello" [Time: 0.002 secs]
"hello"
(print stringp)
CYC(#): (print stringp)
Error: STRINGP is not bound.
(print #$Lenat)
CYC(#): (print #$Lenat)
#$Lenat [Time: 0.0 secs]
#$Lenat