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

uses
  Crt, StringUtils, SySutils, CIO;

var
  strBuffer : string;
var
  eff_loop_var : byte;
  eff_cnt : byte;
  eff_string : string;
// Effectus example:
// Using string manipulation PROCedures
// SCopy, ScopyS and SAssign

procedure MAINProc;
var
  key : byte;  // key_byte_array
  STR01 : array[0..21] of byte;  // STR01_byte_array
  STR02 : array[0..15] of byte;  // STR02_byte_array
  STR03 : array[0..15] of byte;  // STR03_byte_array
begin
  Write(Chr(125));
  Writeln('');
  for eff_loop_var := 0 to 21 do    STR01[eff_loop_var] := 32;
  eff_string := 'HELLO THERE: ATARIAN';
  for eff_loop_var := 0 to 19 do STR01[eff_loop_var] := Ord(eff_string[eff_loop_var + 1]);
  for eff_loop_var := 0 to 15 do    STR02[eff_loop_var] := 32;
  for eff_loop_var := 0 to 21 do    STR02[eff_loop_var] := STR01[eff_loop_var];
  eff_string := '';
  Write('STR01=');  // Print 1

  eff_string := '';
  for eff_loop_var in STR01 do StrAdd(eff_string, chr(eff_loop_var));
  Write(Trim(eff_string));
  Writeln;
  eff_string := '';
  Write('STR02=');  // Print 1

  eff_string := '';
  for eff_loop_var in STR02 do StrAdd(eff_string, chr(eff_loop_var));
  Write(Trim(eff_string));
  Writeln;
  for eff_loop_var := 0 to 15 do    STR02[eff_loop_var] := 32;
  for eff_loop_var := 0 to 5-1 do STR02[eff_loop_var] := STR01[eff_loop_var+1-1];
  eff_string := '';
  Write('STR02=');  // Print 1

  eff_string := '';
  for eff_loop_var in STR02 do StrAdd(eff_string, chr(eff_loop_var));
  Write(Trim(eff_string));
  Writeln;
  for eff_loop_var := 0 to 15 do    STR03[eff_loop_var] := 32;
  for eff_loop_var := 0 to 11-7 do STR03[eff_loop_var] := STR01[eff_loop_var+7-1];
  eff_string := '';
  Write('STR03=');  // Print 1

  eff_string := '';
  for eff_loop_var in STR03 do StrAdd(eff_string, chr(eff_loop_var));
  Write(Trim(eff_string));
  Writeln;
  for eff_loop_var := 0 to 15 do    STR03[eff_loop_var] := 32;
  eff_string := 'HELLO THERE: ATARIAN';
  for eff_loop_var := 0 to 18-14 do STR03[eff_loop_var] := Ord(eff_string[eff_loop_var+14]);
  eff_string := '';
  Write('STR03=');  // Print 1

  eff_string := '';
  for eff_loop_var in STR03 do StrAdd(eff_string, chr(eff_loop_var));
  Write(Trim(eff_string));
  Writeln;
  eff_string := 'ATARI   ';
  eff_cnt := 1;
  for eff_loop_var := 7 - 1 to 20 -1 do begin
    STR01[eff_loop_var] := Ord(eff_string[eff_cnt]);
    Inc(eff_cnt);
  end;
  eff_string := '';
  Write('STR01=');  // Print 1

  eff_string := '';
  for eff_loop_var in STR01 do StrAdd(eff_string, chr(eff_loop_var));
  Write(Trim(eff_string));
  Writeln;
  for eff_loop_var := 0 to 15 do    STR02[eff_loop_var] := 32;
  eff_string := 'TO OTHER MECH';
  for eff_loop_var := 0 to 12 do STR02[eff_loop_var] := Ord(eff_string[eff_loop_var + 1]);
  eff_cnt := 0;
  for eff_loop_var := 7 - 1 to 20 - 1 do begin
    STR01[eff_loop_var] := STR02[eff_cnt];
    Inc(eff_cnt);
  end;
  eff_string := '';
  Write('STR01=');  // Print 1

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

begin
  MAINProc;
end.
