Null object: Difference between revisions
Content added Content deleted
(Added Bracmat example) |
No edit summary |
||
Line 845: | Line 845: | ||
var ns: string not nil = nil # Compile time error</lang> |
var ns: string not nil = nil # Compile time error</lang> |
||
=={{header|Oberon-2}}== |
|||
{{works with|oo2c}} |
|||
<lang oberon2> |
|||
MODULE Null; |
|||
IMPORT |
|||
Out; |
|||
TYPE |
|||
Object = POINTER TO ObjectDesc; |
|||
ObjectDesc = RECORD |
|||
END; |
|||
VAR |
|||
o: Object; (* default initialization to NIL *) |
|||
BEGIN |
|||
IF o = NIL THEN Out.String("o is NIL"); Out.Ln END |
|||
END Null. |
|||
</lang> |
|||
{{out}} |
|||
<pre> |
|||
o is NIL |
|||
</pre> |
|||
=={{header|Objective-C}}== |
=={{header|Objective-C}}== |