Jump to content

Undefined values: Difference between revisions

m
(→‎{{header|Python}}: Modified comments to stress creation/deletion. There is no 'undefined' value to give.)
m (→‎[[Undefined values#ALGOL 68]]: rename some variables)
Line 9:
 
Note: Some implementations (eg [[ALGOL 68C]]) also have a procedure named ''undefined'' that is called to indicated that the behaviour at a particular point in a program is unexpected, undefined, or non-standard.
<lang algol68>MODE XR = REF REAL;
REFR X xr := NIL;
 
MODE U = UNION(COMPL, VOID);
U u := EMPTY;
 
IF xr IS REF XR(NIL) THEN
print(("xr IS NIL", new line))
ELSE
print(("xr ISNT NIL", new line))
FI;
 
Line 24:
(VOID):print(("u is EMPTY", new line))
OUT print(("u isnt EMPTY", new line))
ESAC</lang>
</lang>
Output:
<pre>
xr IS NIL
u is EMPTY
</pre>
Cookies help us deliver our services. By using our services, you agree to our use of cookies.