Null object: Difference between revisions

Content added Content deleted
m (→‎{{header|REXX}}: expanded the title of the REXX program. -- ~~~~)
Line 273: Line 273:
In practice, all notable hosted implementations follow the C practice of being able to treat a zero address (i.e. FALSE) as a null address for the purpose of list termination.
In practice, all notable hosted implementations follow the C practice of being able to treat a zero address (i.e. FALSE) as a null address for the purpose of list termination.
=={{header|Go}}==
=={{header|Go}}==
Nil is a predefined identifier, defined for six types in Go. In each case, it represents the zero value for the type, that is, the memory representation of all zero bytes. This is the value of a newly created object. In the cases of these six types, an object must be subsequently initialized in some way before it has much use. Examples of initialization are given in the [http://rosettacode.org/wiki/Undefined_values#Go Go solution] of task [http://rosettacode.org/wiki/Undefined_values Undefined values].
Nil is a predefined identifier, defined for six types in Go. In each case, it represents the zero value for the type, that is, the memory representation of all zero bytes. This is the value of a newly created object. In the cases of these six types, an object must be subsequently initialized in some way before it has much use. Examples of initialization are given in the [[Undefined values#Go|Go solution]] of task [[Undefined values]].
<lang go>
<lang go>
package main
package main