// Effectus auto-generated Mad Pascal source code listing
program pointerPrg;

uses
  Crt, StringUtils, SySutils, CIO;

var
  strBuffer : string;
var
  eff_loop_var : byte;
  eff_cnt : byte;
  eff_string : string;
// Effectus example:
// Using pointer
var
  key : byte;  // key_byte_array
  ptr : ^word;  // ptr_byte_array
  i : integer;  // i_byte_array

procedure MAINProc;
begin
  Write(Chr(125));
  eff_string := '';
  Write('Effectus example:');  // Print 1
  Writeln;
  eff_string := '';
  Write('POINT=ER variable demonstration');  // Print 1
  Writeln;
  Writeln('');
  i := 70;
  eff_string := '';
  Write('Current value of variable i: ');  // Print 1
  Writeln;
  eff_string := '';
  Write(I);  // Print 2
  Writeln;
  ptr := @I;
  eff_string := '';
  Write('Memory address of variable i: ');  // Print 1
  Writeln;
  eff_string := '';
  Write(word(ptr));  // Print 2
  Writeln;
  eff_string := '';
  Write('New value of variable ptr and i: ');  // Print 1
  Writeln;
  ptr^ := 251;
  eff_string := '';
  Write(ptr^);  // Print 2

  eff_string := '';
  Write('=');  // Print 1

  eff_string := '';
  Write(i);  // Print 2
  Writeln;
  key := Get(7);
  ReadKey;
end;

begin
  MAINProc;
end.
