1
0
lazarus-tutorials/simple_examples/pointer_project.pas

21 lines
333 B
ObjectPascal
Raw Normal View History

2021-09-23 12:15:42 -04:00
program pointer_project;
{$mode objfpc}{$H+}
type Plongint = ^longint;
var
2021-09-30 14:35:36 -04:00
anInt: longint = 243;
intPtr: Plongint;
2021-09-23 12:15:42 -04:00
begin
2021-09-30 14:35:36 -04:00
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}
2021-09-23 12:15:42 -04:00
end.