Neutral and null valuesFebruary 03. 2012
Datatypes have neutral valuesEach Wirbel datatype has a neutral value. That value is used in places where the type of a variable or a function call is known, but the variable has not been assigned something yet or the execution of a function has reached the end without a return statement. Neutral values of datatypes:
The special value nullNote that datatypes referring to objects and also some immutable types provide a special null value, used as default value. Accessing such a value leads to an Exception of type value.null. There are only two allowed operations: comparison for equality and for identity, i.e. the operators == and is. An empty list is not the same as a null list. In a context where you cannot be sure wether a list is null you can check it:
if list is null:
# handle null list...
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||