Undefined values: Difference between revisions

Content added Content deleted
(→‎{{header|OCaml}}: broke line too long)
(Added PicoLisp)
Line 174: Line 174:
Done
Done
</pre>
</pre>

=={{header|PicoLisp}}==
An internal symbol is initialized to NIL. Depending on the context, this is
interpreted as "undefined". When called as a function, an error is issued:
<lang PicoLisp>: (myfoo 3 4)
!? (myfoo 3 4)
myfoo -- Undefined
?</lang>
The function 'default' can be used to initialize a variable if and only
if its current value is NIL:
<lang PicoLisp>: MyVar
-> NIL

: (default MyVar 7)
-> 7

: MyVar
-> 7

: (default MyVar 8)
-> 7

: MyVar
-> 7</lang>


=={{header|Python}}==
=={{header|Python}}==