Jump to content

Undefined values: Difference between revisions

Line 987:
=={{header|Smalltalk}}==
In Smalltalk, all variables are automatically initialized to nil. This includes instance variables (an object's private slots), class variables and locals. Also global and namespace bindings can only be created by passing an existing value (typically also: nil) to the creation message (at:put:). This is part of the language's specification, not implementation specific. Thus a variable cannot ever be undefined.
 
However, we can check for the existence of a global binding with:
<lang smalltalk>Smalltalk includesKey: #FooBar
myNamespace includesKey: #Baz</lang>
 
=={{header|Tcl}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.