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

uses
  Crt, StringUtils, SySutils, CIO;

var
  strBuffer : string;
var
  eff_loop_var : byte;
  eff_cnt : byte;
  eff_string : string;
// Effectus example:
// String input demo
// (using InputS procedure)
var
  key : byte;  // key_byte_array
  name : array[0..13] of byte;  // name_byte_array
  surname : array[0..21] of byte;  // surname_byte_array

procedure MAINProc;
begin
  Write(Chr(125));
  eff_string := '';
  Write('Effectus example:');  // Print 1
  Writeln;
  eff_string := '';
  Write('String input demonstration');  // Print 1
  Writeln;
  eff_string := '';
  Write('using InputS procedure');  // Print 1
  Writeln;
  Writeln('');
  eff_string := '';
  Write('Whats your name?');  // Print 1
  Writeln;
  eff_string := '';
  Readln(eff_string);
  for eff_loop_var := 0 to 13 do    name[eff_loop_var] := 32;
  eff_cnt := 1;
  for eff_loop_var := 0 to Length(eff_string) - 1 do begin
    name[eff_loop_var] := Ord(eff_string[eff_cnt]);
    Inc(eff_cnt);
  end;
  Writeln('');
  eff_string := '';
  Write('Whats your surname?');  // Print 1
  Writeln;
  eff_string := '';
  Readln(eff_string);
  for eff_loop_var := 0 to 21 do    surname[eff_loop_var] := 32;
  eff_cnt := 1;
  for eff_loop_var := 0 to Length(eff_string) - 1 do begin
    surname[eff_loop_var] := Ord(eff_string[eff_cnt]);
    Inc(eff_cnt);
  end;
  Writeln('');
  eff_string := '';
  Write('Thank you,');  // Print 1

  eff_string := '';
  for eff_loop_var in name do StrAdd(eff_string, chr(eff_loop_var));
  Write(Trim(eff_string));

  Write(Chr(32));
  eff_string := '';
  for eff_loop_var in surname do StrAdd(eff_string, chr(eff_loop_var));
  Write(Trim(eff_string));
  Writeln;
  Writeln('');
  key := Get(7);
  ReadKey;
end;

begin
  MAINProc;
end.
