Undefined values: Difference between revisions
Content added Content deleted
(→{{header|PicoLisp}}: Added PureBasic) |
(+Icon+Unicon) |
||
Line 17: | Line 17: | ||
then if you make the mistake of writing your program such that it at some point requires the value of <code>resurrect 0</code>, you'll get the error message "I'm out of orange smoke!". |
then if you make the mistake of writing your program such that it at some point requires the value of <code>resurrect 0</code>, you'll get the error message "I'm out of orange smoke!". |
||
== Icon and Unicon == |
|||
Icon/Unicon don't really have a notion of an undefined variable. There is a [[Undefined_values/Check_if_a_variable_is_defined|null value/data type that can be tested]]. However, it is possible in Unicon to interrogate the environment and obtain the string names of variables in the current (or calling procedures). |
|||
==={{header|Icon}}=== |
|||
These functions don't exist in Icon. |
|||
==={{header|Unicon}}=== |
|||
<lang Unicon>global G1 |
|||
procedure main() |
|||
local M1 |
|||
undeftest() |
|||
end |
|||
procedure undeftest(P1) |
|||
static S1 |
|||
local L1,L2 |
|||
every #write all local, parameter, static, and global variable names |
|||
write((localnames|paramnames|staticnames|globalnames)(¤t,0)) # ... visible in the current co-expression at this calling level |
|||
return |
|||
end</lang> |
|||
=={{header|J}}== |
=={{header|J}}== |