Undefined values: Difference between revisions
m
→{{header|Wren}}: Changed to Wren S/H
Thundergnat (talk | contribs) m (syntax highlighting fixup automation) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
(2 intermediate revisions by one other user not shown) | |||
Line 361:
0 1 :> ( a b )
]</syntaxhighlight>
=={{header|Forth}}==
Forth does not have undefined values, but defined and undefined variables can be checked.
<syntaxhighlight lang="forth">
[undefined] var [if] .( var is undefined at first check) cr [then]
marker forget-var
variable var
[defined] var [if] .( var is defined at second check) cr [then]
forget-var
[undefined] var [if] .( var is undefined at third check) cr [then]
</syntaxhighlight>
{{out}}
<pre>
var is undefined at first check
var is defined at second check
var is undefined at third check
</pre>
=={{header|Fortran}}==
Line 1,505 ⟶ 1,527:
In conditional expressions, ''null'' as well as the Boolean value ''false'' are considered to be 'false'. All other values (including zero) are considered to be 'true'.
<syntaxhighlight lang="
System.print("'f' called.") // note no return value
}
|