1
0
lazarus-tutorials/simple_examples/pointer_project.pas
2021-09-30 14:35:36 -04:00

21 lines
333 B
ObjectPascal

program pointer_project;
{$mode objfpc}{$H+}
type Plongint = ^longint;
var
anInt: longint = 243;
intPtr: Plongint;
begin
intPtr := @anInt;
WriteLn('The value of intPtr^ is ', intPtr^);
Inc(intPtr^, 4);
WriteLn('The value of anInt after Inc(intPtr^, 4) is: ',anInt);
{$IFDEF WINDOWS}
readln;
{$ENDIF}
end.