1
0
Fork 0
lazarus-tutorials/simple_examples/pointer_project.pas

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.