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

uses
  Crt, StringUtils, SySutils, CIO;

var
  strBuffer : string;
var
  eff_loop_var : byte;
  eff_cnt : byte;
  eff_string : string;
// Effectus example:
// Printing ATASCII characters

procedure MAINProc;
var
  key : byte;  // key_byte_array
  n : byte;  // n_byte_array
  a : byte;  // a_byte_array
  b : byte;  // b_byte_array
  arr : array[0..5] of byte;  // arr_byte_array
begin
  Write(Chr(125));
  eff_string := '';
  Write('ASCII manipulation demonstration');  // Print 1
  Writeln;
  Writeln('');
  eff_string := '';
  Write('Character Put test');  // Print 1
  Writeln;
  Write(Chr(65));
  Write(Chr(84));
  Write(Chr(97));
  Write(Chr(82));
  Write(Chr($49));
  Writeln('');
  eff_string := '';
  Write('Some math');  // Print 1
  Writeln;
  a := 65;
  b := 66;
  eff_string := '';
  Write('a=65,b=66,a+b=');  // Print 1

  n := a+b;
  eff_string := '';
  Write(n);  // Print 2
  Writeln;
  Writeln('');
  eff_string := '';
  Write('Array test');  // Print 1
  Writeln;
  arr[1] := 65;
  eff_string := '';
  Write(arr[1]);  // Print 2

  arr[2] := 50;
  arr[3] := 67;
  arr[4] := 52;
 FOR n:=2 TO 4 do begin
  Write(Chr(44));
  eff_string := '';
  Write(ARR[N]);  // Print 2

  end;
  key := Get(7);
  ReadKey;
end;

begin
  MAINProc;
end.
