Difference between revisions of "SubL/examples.print"

From Public Domain Knowledge Bank
Jump to: navigation, search
(Created page with "<noinclude> == SubL/examples.1 == === SubL/examples.IO === </noinclude> ==== print w/ 0 arguments ==== CYC(#): (print) Error: Cannot make an arity 0 function from #<...")
 
(print w/ 0 arguments is ERROR)
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
== [[SubL/examples.1]] ==
+
== [[:SubL/examples.1]] ==
=== [[SubL/examples.IO]] ===
+
=== [[:SubL/examples.IO]] ===
 
</noinclude>
 
</noinclude>
==== print w/ 0 arguments ====
+
=== print w/ 0 arguments is ERROR ===
 
  CYC(#): (print)
 
  CYC(#): (print)
 
  Error: Cannot make an arity 0 function from #<Function PRINT> {req=1 ...}
 
  Error: Cannot make an arity 0 function from #<Function PRINT> {req=1 ...}
==== print w/ 2 arguments ====
+
 
 +
=== print w/ 2 arguments ===
 +
==== arg2 must be OUTPUT-TEXT-STREAM ====
 
  CYC(#):(print "hello" #$Lenat)
 
  CYC(#):(print "hello" #$Lenat)
 
  Error: #$Lenat is not of type: OUTPUT-TEXT-STREAM.
 
  Error: #$Lenat is not of type: OUTPUT-TEXT-STREAM.
Line 12: Line 14:
 
  [Time: 0.006 secs]
 
  [Time: 0.006 secs]
 
  "hello"
 
  "hello"
==== print w/ 2+ arguments ====
+
 
 +
==== print w/ 3+ arguments is ERROR ====
 
  CYC(#): (print "hello" "world" #$Lenat)
 
  CYC(#): (print "hello" "world" #$Lenat)
 
  Error: Cannot make an arity 3 function from #<Function PRINT> {req=1 opt=1 allowsrest=false}
 
  Error: Cannot make an arity 3 function from #<Function PRINT> {req=1 opt=1 allowsrest=false}
Line 18: Line 21:
 
==== print w/ 1 argument ====
 
==== print w/ 1 argument ====
  
===== (print "hello") =====
+
===== (print "string") =====
 
  CYC(#): (print "hello")
 
  CYC(#): (print "hello")
 
  "hello" [Time: 0.002 secs]
 
  "hello" [Time: 0.002 secs]
 
  "hello"
 
  "hello"
 +
===== (print 'symbol ) =====
 +
CYC(15): (print 'symb)
 +
SYMB [Time: 0.002 secs]
 +
SYMB
 
===== (print stringp) =====
 
===== (print stringp) =====
 
  CYC(#): (print stringp)
 
  CYC(#): (print stringp)

Latest revision as of 03:34, 8 March 2019

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

arg2 must be OUTPUT-TEXT-STREAM

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

print w/ 3+ arguments is ERROR

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 "string")
CYC(#): (print "hello")
"hello" [Time: 0.002 secs]
"hello"
(print 'symbol )
CYC(15): (print 'symb)
SYMB [Time: 0.002 secs]
SYMB
(print stringp)
CYC(#): (print stringp)
Error: STRINGP is not bound.
(print #$Lenat)
CYC(#): (print #$Lenat)
#$Lenat [Time: 0.0 secs]
#$Lenat