Null object: Difference between revisions
m
→{{header|Phix}}
Line 1,027:
=={{header|Phix}}==
There is
▲There is also a builtin NULL, however it is equivalent to the integer 0 and will trigger a type check if assigned to a variable declared as string or sequence. In most programs the zero-length string/sequence (""/{}) suffices,
but if you want a variable that can be a string/sequence or NULL, but not other arbitrary integer/float values, use something like the following user-defined types:
<lang Phix>type nullableString(object o)
Line 1,065 ⟶ 1,046:
q = NULL
--q = 1 -- error</lang>
See also [[Undefined_values#Phix|Undefined_values]]
=={{header|PHL}}==
|