1
0
lazarus-tutorials/simple_examples/pointer_project.pas
2021-09-23 12:15:42 -04:00

21 lines
349 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.