Jump to content

Null object: Difference between revisions

m
(Lingo added)
Line 746:
 
=={{header|Lingo}}==
Null/nil is called "<Void>" in Lingo. Lingo doesn't distinguish undefined variables from <Void> objects, and by using the constant VOID you can even assign <Void> to variables. Functions that don't return anything, return <Void>. Checking for <Void> (e.g. by using built-in function voidP) can also be used to implement optional function arguments: if voidP() returns TRUE (1) for some argument, a default value can be assigned in the function body.
<lang lingo>put _global.doesNotExist
-- <Void>
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.