Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Null-object/ALGOL-W/null-object.alg
Normal file
10
Task/Null-object/ALGOL-W/null-object.alg
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
begin
|
||||
% declare a record type - will be accessed via references %
|
||||
record R( integer f1, f2, f3 );
|
||||
% declare a reference to a R instance %
|
||||
reference(R) refR;
|
||||
% assign null to the reference %
|
||||
refR := null;
|
||||
% test for a null reference - will write "refR is null" %
|
||||
if refR = null then write( "refR is null" ) else write( "not null" );
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue