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

uses
  Crt, StringUtils, SySutils, CIO;

var
  strBuffer : string;
var
  eff_loop_var : byte;
  eff_cnt : byte;
  eff_string : string;
// Effectus example:
// Random number generator demo
// (Rand function)
var
  i : byte;  // i_byte_array
  key : byte;  // key_byte_array

procedure MAINProc;
begin
  Write(Chr(125));
  eff_string := '';
  Write('Effectus example:');  // Print 1
  Writeln;
  eff_string := '';
  Write('Random number generator demonstration');  // Print 1
  Writeln;
  eff_string := '';
  Write('(function Rand)');  // Print 1
  Writeln;
  Writeln('');
  eff_string := '';
  Write('Press any key to see random numbers!');  // Print 1
  Writeln;
  key := Get(7);
  ReadKey;
  Writeln('');
  eff_string := '';
  Write('Selected number between 0 and 100');  // Print 1
  Writeln;
  i := Random(100);
  eff_string := '';
  Write(i);  // Print 2
  Writeln;
  Writeln('');
  eff_string := '';
  Write('Selected number between 0 and 255');  // Print 1
  Writeln;
  i := Random(255);
  eff_string := '';
  Write(i);  // Print 2
  Writeln;
  Writeln('');
  eff_string := '';
  Write('Selected number between 0 and 3');  // Print 1
  Writeln;
  i := Random(3);
  eff_string := '';
  Write(i);  // Print 2
  Writeln;
  key := Get(7);
  ReadKey;
end;

begin
  MAINProc;
end.
