Boolean values: Difference between revisions
Content added Content deleted
(Logo) |
|||
Line 76: | Line 76: | ||
if "true [print "yes] ; yes |
if "true [print "yes] ; yes |
||
if not "false [print "no] ; no |
if not "false [print "no] ; no |
||
</lang> |
|||
Unlike other lispy languages, there are no other implicit conversions. You must test explicitly for zero or empty collections. |
|||
<lang logo> |
|||
if equal? 0 ln 1 [print "zero] |
|||
if empty? [] [print "empty] ; empty list |
|||
if empty? "|| [print "empty] ; empty word |
|||
</lang> |
</lang> |
||