mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-11 17:48:53 +02:00
26 lines
406 B
ObjectPascal
26 lines
406 B
ObjectPascal
{ Old file: tbs0334.pp }
|
|
{ }
|
|
|
|
{$ifdef fpc}{$mode objfpc}{$endif}
|
|
|
|
type
|
|
tvarrec=record
|
|
vpointer : pointer;
|
|
end;
|
|
var
|
|
r : tvarrec;
|
|
b : boolean;
|
|
function Next: TVarRec;
|
|
begin
|
|
next:=r;
|
|
end;
|
|
|
|
begin
|
|
r.vpointer:=@b;
|
|
{ The result of next is loaded and a value is assigned }
|
|
with Next do
|
|
boolean(VPointer^) := true;
|
|
if not b then
|
|
writeln('Error with assigning to function result');
|
|
end.
|