Jump to content

Undefined values: Difference between revisions

→‎LOLCODE: Add demonstration
(→‎LOLCODE: Add demonstration)
Line 552:
show name? "n ; false
show :n ; n has no value</lang>
 
=={{header|LOLCODE}}==
LOLCODE's nil value is called <tt>NOOB</tt>, to which all uninitialized variables evaluate, and which is distinct from <tt>FAIL</tt>, the false value.
<lang LOLCODE>HAI 1.3
 
I HAS A foo BTW, INISHULIZD TO NOOB
DIFFRINT foo AN FAIL, O RLY?
YA RLY, VISIBLE "FAIL != NOOB"
OIC
 
I HAS A bar ITZ 42
bar, O RLY?
YA RLY, VISIBLE "bar IZ DEFIND"
OIC
 
bar R NOOB BTW, UNDEF bar
bar, O RLY?
YA RLY, VISIBLE "SHUD NEVAR C DIS"
OIC
 
KTHXBYE</lang>
 
=={{header|Lua}}==
<lang lua>print( a )
Cookies help us deliver our services. By using our services, you agree to our use of cookies.