Table of Contents

TDUTAB

Table Of Contents

Source Code

TDUTAB.txt
ASCII
*NOSEQ
*WIDTH 95
MODULE ^T^D^U^T^A^B;

?? SET ( CHKALL @D= ON ), RIGHT @D= 110 ??

^0  M^O^D^U^L^E @D  TDUTAB ^2
^0            C^O^P^Y^R^I^G^H^T C^O^N^T^R^O^L D^A^T^A S^Y^S^T^E^M^S I^N^C.  1992.  ^2
^0  W^R^I^T^T^E^N@D  1/84 ^B^Y R. L^I^N^D^S^E^Y  ^2
^0  V^E^R^S^I^O^N@D  C^Y^B^E^R 170/180, ^V^E^R^S^I^O^N 1 ^2
^0  P^U^R^P^O^S^E@D  T^H^I^S ^M^O^D^U^L^E ^E^N^C^A^P^S^U^L^A^T^E^S ^T^H^E ^I^N^T^E^R^N^A^L ^T^A^B^L^E^S ^O^F ^T^H^E TDU ^P^R^O^G^R^A^M.

^0            I^T ^P^R^O^V^I^D^E^S ^F^U^N^C^T^I^O^N^S ^T^O ^A^D^D ^E^L^E^M^E^N^T^S ^T^O ^T^H^E ^T^A^B^L^E^S, ^T^O ^O^P^T^I^M^I^Z^E ^2
^0            ^T^H^E^M, ^A^N^D ^T^O ^R^E^T^U^R^N ^T^H^E ^E^L^E^M^E^N^T^S ^F^O^R ^O^U^T^P^U^T.  ^2
^0            T^H^I^S ^M^O^D^U^L^E ^H^A^S ^N^O I/O.  ^2

  ?? PUSH ( LIST @D= OFF ) ??          ^0^U^S^E ^T^H^I^S ^L^I^N^E ^T^O ^S^U^P^P^R^E^S^S ^C^O^M^M^D^E^C^K ^L^I^S^T^2
^0 ?? PUSH ( LIST @D= ON )  ??          ^0^U^S^E ^T^H^I^S ^L^I^N^E ^T^O ^L^I^S^T ^C^O^M^M^O^N ^D^E^C^K^S ^2
?? SKIP @D= 4 ??

?? NEWTITLE @D= 'ZTDTTAB' ??
^0 **************************** ^2
^0 ^C^O^M^M^O^N ^D^E^C^K ZTDTTAB ^F^O^L^L^O^W^S@D ^2
*CALL ZTDTTAB

?? OLDTITLE ??

^0 ************************** ^2
^0 ^T^D^U ^E^R^R^O^R ^H^A^N^D^L^E^R ^F^O^L^L^O^W^S@D ^2
*CALL ZTDPERR
*CALL ZTDCCON

^0 ************************* ^2
^0 ^T^D^U ^V^E^R^B-^T^A^B^L^E ^C^O^N^S^T^A^N^T^S@D ^2
*CALL ZTDCVRB

?? EJECT ??
?? POP ??

  VAR
     ^P^A^R^M_^R^E^C^O^R^D@D ^P^A^R^A^M^E^T^E^R_^R^E^C^O^R^D,   ^0 ^A^L^L ^P^A^R^A^M^E^T^E^R^S ^S^T^O^R^E^D ^H^E^R^E ^2
     ^I^N^P^U^T_^L^I^S^T@D @B^I^N^P^U^T_^N^O^D^E @D= NIL, ^0 ^H^E^A^D ^O^F ^I^N^P^U^T ^L^I^S^T ^2
     ^I^N^P^U^T_^O^F^F^S^E^T@D INTEGER,
     ^O^U^T^P^U^T_^T^A^B^L^E@D ARRAY [ 0 .. ^O^U^T^P^U^T_^L^A^S^T_^O^R^D^I^N^A^L ] OF ^S^T^R^I^N^G_^N^O^D^E,
     ^K^E^Y_^N^A^M^E_^T^A^B^L^E@D ARRAY [ 0 .. ^K^E^Y_^N^A^M^E_^L^A^S^T_^O^R^D^I^N^A^L ] OF ^S^T^R^I^N^G_^N^O^D^E,
     ^I^N^I^T_^T^A^B^L^E@D ARRAY [ 0 .. ^I^N^I^T_^L^A^S^T_^O^R^D^I^N^A^L ] OF ^S^T^R^I^N^G_^N^O^D^E,
     ^A^P^P^S^T^R_^T^A^B^L^E,
     ^A^P^P^S^T^R_^N^E^X^T_^N^O^D^E_^D^U^M^P^E^D,
     ^A^P^P^S^T^R_^L^A^T^E^S^T_^N^E^W_^N^O^D^E@D @B^A^P^P^S^T^R_^N^O^D^E,
     ^O^U^T^P^U^T_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S,
     ^K^E^Y_^N^A^M^E_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S,
     ^I^N^I^T_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S,
     ^A^P^P^S^T^R_^T^O^T^A^L_^S^E^Q^U^E^N^C^E^S,
     ^A^P^P^S^T^R_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S@D INTEGER,
     ^S^T^A^T^U^S@D ^O^S^T$^S^T^A^T^U^S;

  ?? NEWTITLE @D= '^S^T^O^R^E_^O^R^D_^C^H^A^R_^N^O^D^E' ??
  ?? EJECT ??

  PROCEDURE ^S^T^O^R^E_^O^R^D_^C^H^A^R_^N^O^D^E (^O^R^D^I^N^A^L@D ^O^R^D^I^N^A^L_^T^Y^P^E;
        ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H@D INTEGER;
        ^C^H^A^R_^S^E^Q^U^E^N^C^E@D STRING(*);
        VAR ^T^A^B^L^E@D ARRAY [ * ] OF ^S^T^R^I^N^G_^N^O^D^E;
        VAR ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S@D INTEGER;
        VAR ^E^R^R^O^R_^R^E^T^U^R^N@D ^E^R^R^O^R_^T^Y^P^E);

     ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^E^R^R^O^R;
     IF ^T^A^B^L^E[^O^R^D^I^N^A^L].^L^E^N^G^T^H > 0 THEN
        ^E^R^R^O^R_^R^E^T^U^R^N @D= ^D^U^P^L^I^C^A^T^E_^E^R^R^O^R
     ELSEIF ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H > 0 THEN
        ALLOCATE ^T^A^B^L^E[^O^R^D^I^N^A^L].^C^H^A^R^S @D [ ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H ];
        IF ^T^A^B^L^E[^O^R^D^I^N^A^L].^C^H^A^R^S = NIL THEN
           ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^R^O^O^M_^E^R^R^O^R;
        ELSE
           ^T^A^B^L^E[^O^R^D^I^N^A^L].^L^E^N^G^T^H @D= ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H;
           ^T^A^B^L^E[^O^R^D^I^N^A^L].^C^H^A^R^S@B @D= ^C^H^A^R_^S^E^Q^U^E^N^C^E(1,^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H);
           ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S @D= ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S + ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H
        IFEND
     IFEND
  PROCEND ^S^T^O^R^E_^O^R^D_^C^H^A^R_^N^O^D^E;
  ?? OLDTITLE ??

  ?? NEWTITLE := '^C^O^N^C^A^T^E^N^A^T^E_^S^E^Q^U^E^N^C^E^S' ??
  ?? EJECT ??

  PROCEDURE ^C^O^N^C^A^T^E^N^A^T^E_^S^E^Q^U^E^N^C^E^S (^N^E^W_^S^E^Q: STRING(*);
        ^N^E^W_^S^E^Q_^L^E^N^G^T^H: INTEGER;
        VAR ^T^A^B^L^E_^N^O^D^E: ^S^T^R^I^N^G_^N^O^D^E;
        VAR ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S: INTEGER;
        VAR ^E^R^R^O^R_^R^E^T^U^R^N: ^E^R^R^O^R_^T^Y^P^E);
     VAR
        ^A^L^L^O^C^A^T^I^O^N_^L^E^N,
        ^S^T^R^I^N^G^R^E^P_^L^E^N: INTEGER,
        ^O^L^D_^N^O^D^E: ^S^T^R^I^N^G_^N^O^D^E;

     ^E^R^R^O^R_^R^E^T^U^R^N := ^N^O_^E^R^R^O^R;
     ^O^L^D_^N^O^D^E := ^T^A^B^L^E_^N^O^D^E;
     IF ^O^L^D_^N^O^D^E.^L^E^N^G^T^H = 0 THEN
        ^A^L^L^O^C^A^T^I^O^N_^L^E^N := ^N^E^W_^S^E^Q_^L^E^N^G^T^H
     ELSE
        ^A^L^L^O^C^A^T^I^O^N_^L^E^N := ^O^L^D_^N^O^D^E.^L^E^N^G^T^H + ^N^E^W_^S^E^Q_^L^E^N^G^T^H
     IFEND;
     ^T^A^B^L^E_^N^O^D^E.^L^E^N^G^T^H := ^A^L^L^O^C^A^T^I^O^N_^L^E^N;
     IF ^A^L^L^O^C^A^T^I^O^N_^L^E^N > 0 THEN    ^0 ^C^A^N'^T ^A^L^L^O^C^A^T^E 0 ^2
        ALLOCATE ^T^A^B^L^E_^N^O^D^E.^C^H^A^R^S : [ ^A^L^L^O^C^A^T^I^O^N_^L^E^N ];
        IF ^T^A^B^L^E_^N^O^D^E.^C^H^A^R^S = NIL THEN
           ^E^R^R^O^R_^R^E^T^U^R^N := ^N^O_^R^O^O^M_^E^R^R^O^R;
        ELSE
           IF ^O^L^D_^N^O^D^E.^L^E^N^G^T^H = 0 THEN
              ^T^A^B^L^E_^N^O^D^E.^C^H^A^R^S@B := ^N^E^W_^S^E^Q(1,^N^E^W_^S^E^Q_^L^E^N^G^T^H)
           ELSE
              STRINGREP(^T^A^B^L^E_^N^O^D^E.^C^H^A^R^S@B, ^S^T^R^I^N^G^R^E^P_^L^E^N,
                 ^O^L^D_^N^O^D^E.^C^H^A^R^S@B(1,^O^L^D_^N^O^D^E.^L^E^N^G^T^H),
                 ^N^E^W_^S^E^Q(1,^N^E^W_^S^E^Q_^L^E^N^G^T^H));
              FREE ^O^L^D_^N^O^D^E.^C^H^A^R^S
           IFEND;
           ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S := ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S + ^N^E^W_^S^E^Q_^L^E^N^G^T^H
        IFEND
     IFEND
  PROCEND ^C^O^N^C^A^T^E^N^A^T^E_^S^E^Q^U^E^N^C^E^S;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^I^N^I^T^I^A^L^I^Z^E_^T^A^B^L^E^S' ??
  ?? EJECT ??

  PROCEDURE [XDCL] ^I^N^I^T^I^A^L^I^Z^E_^T^A^B^L^E^S;
     VAR
        ^T^A^B^L^E_^N^D^X@D INTEGER;

     ALLOCATE ^I^N^P^U^T_^L^I^S^T @D [ ^F^A^I^L ];  ^0 ^I^G^N^O^R^E ^N^O-^R^O^O^M ^E^R^R^O^R, ^C^A^U^G^H^T ^L^A^T^E^R ^2
     IF ^I^N^P^U^T_^L^I^S^T <> NIL THEN
        ^I^N^P^U^T_^L^I^S^T@B.^N^E^X^T_^N^O^D^E @D= NIL;
        ^I^N^P^U^T_^L^I^S^T@B.^O^F^F^S^E^T @D= 0;
        ^I^N^P^U^T_^L^I^S^T@B.^N^O^D^E_^V^I^S^I^T^E^D @D= FALSE
     IFEND;
     FOR ^T^A^B^L^E_^N^D^X @D= 1 TO ^O^U^T^P^U^T_^L^A^S^T_^O^R^D^I^N^A^L DO
        ^O^U^T^P^U^T_^T^A^B^L^E[^T^A^B^L^E_^N^D^X].^L^E^N^G^T^H @D= 0;
        ^O^U^T^P^U^T_^T^A^B^L^E[^T^A^B^L^E_^N^D^X].^C^H^A^R^S @D= NIL
     FOREND;
     ^O^U^T^P^U^T_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S @D= 0;
     FOR ^T^A^B^L^E_^N^D^X @D= 1 TO ^K^E^Y_^N^A^M^E_^L^A^S^T_^O^R^D^I^N^A^L DO
        ^K^E^Y_^N^A^M^E_^T^A^B^L^E[^T^A^B^L^E_^N^D^X].^L^E^N^G^T^H @D= 0;
        ^K^E^Y_^N^A^M^E_^T^A^B^L^E[^T^A^B^L^E_^N^D^X].^C^H^A^R^S @D= NIL
     FOREND;
     ^K^E^Y_^N^A^M^E_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S @D= 0;
     FOR ^T^A^B^L^E_^N^D^X @D= 1 TO ^I^N^I^T_^L^A^S^T_^O^R^D^I^N^A^L DO
        ^I^N^I^T_^T^A^B^L^E[^T^A^B^L^E_^N^D^X].^L^E^N^G^T^H @D= 0;
        ^I^N^I^T_^T^A^B^L^E[^T^A^B^L^E_^N^D^X].^C^H^A^R^S @D= NIL
     FOREND;
     ^I^N^I^T_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S @D= 0;
     ^A^P^P^S^T^R_^T^A^B^L^E @D= NIL;
     ^A^P^P^S^T^R_^L^A^T^E^S^T_^N^E^W_^N^O^D^E @D= NIL;
     ^A^P^P^S^T^R_^N^E^X^T_^N^O^D^E_^D^U^M^P^E^D @D= NIL;
     ^A^P^P^S^T^R_^T^O^T^A^L_^S^E^Q^U^E^N^C^E^S @D= 0;
     ^A^P^P^S^T^R_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S @D= 0
  PROCEND ^I^N^I^T^I^A^L^I^Z^E_^T^A^B^L^E^S;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^S^T^O^R^E_^P^A^R^A^M^E^T^E^R^S' ??
  ?? EJECT ??

  PROCEDURE [XDCL] ^S^T^O^R^E_^P^A^R^A^M^E^T^E^R^S (^P^A^R^M@D ^P^A^R^A^M^E^T^E^R_^R^E^C^O^R^D);
     ^P^A^R^M_^R^E^C^O^R^D @D= ^P^A^R^M;             ^0 ^S^A^V^E ^I^T ^I^N ^M^Y ^L^O^C^A^L ^S^P^A^C^E ^2
  PROCEND ^S^T^O^R^E_^P^A^R^A^M^E^T^E^R^S;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^D^U^M^P_^P^A^R^A^M^E^T^E^R^S' ??
  ?? SKIP @D= 4 ??

  PROCEDURE [XDCL] ^D^U^M^P_^P^A^R^A^M^E^T^E^R^S (VAR ^P^A^R^M@D ^P^A^R^A^M^E^T^E^R_^R^E^C^O^R^D);
     ^P^A^R^M @D= ^P^A^R^M_^R^E^C^O^R^D;             ^0 ^G^I^V^E ^C^A^L^L^E^R ^M^Y ^C^O^P^Y ^2
  PROCEND ^D^U^M^P_^P^A^R^A^M^E^T^E^R^S;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^S^T^O^R^E_^O^U^T^P^U^T_^N^O^D^E' ??
  ?? EJECT ??

  PROCEDURE [XDCL] ^S^T^O^R^E_^O^U^T^P^U^T_^N^O^D^E (^O^R^D^I^N^A^L@D ^O^R^D^I^N^A^L_^T^Y^P^E;
        ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H@D INTEGER;
        ^C^H^A^R_^S^E^Q^U^E^N^C^E@D STRING(*);
        VAR ^E^R^R^O^R_^R^E^T^U^R^N@D ^E^R^R^O^R_^T^Y^P^E);

     IF ( ^O^R^D^I^N^A^L < 0 ) OR
        ( ^O^R^D^I^N^A^L > ^O^U^T^P^U^T_^L^A^S^T_^O^R^D^I^N^A^L ) THEN
        ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^R^O^O^M_^E^R^R^O^R
     ELSE
        ^C^O^N^C^A^T^E^N^A^T^E_^S^E^Q^U^E^N^C^E^S(^C^H^A^R_^S^E^Q^U^E^N^C^E, ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H,
           ^O^U^T^P^U^T_^T^A^B^L^E[^O^R^D^I^N^A^L], ^O^U^T^P^U^T_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S,
           ^E^R^R^O^R_^R^E^T^U^R^N)
     IFEND
  PROCEND ^S^T^O^R^E_^O^U^T^P^U^T_^N^O^D^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^D^U^M^P_^O^U^T^P^U^T_^N^O^D^E' ??
  ?? SKIP @D= 4 ??

  PROCEDURE [XDCL] ^D^U^M^P_^O^U^T^P^U^T_^N^O^D^E (^O^R^D^I^N^A^L@D ^O^R^D^I^N^A^L_^T^Y^P^E;
        VAR ^L^E^N^G^T^H@D INTEGER;
        VAR ^C^H^A^R^S@D @BSTRING(*);
        VAR ^T^O^T^A^L_^O^R^D^I^N^A^L^S@D INTEGER;
        VAR ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S@D INTEGER;
        VAR ^N^O^D^E_^R^E^T^U^R^N^E^D@D BOOLEAN);

     ^N^O^D^E_^R^E^T^U^R^N^E^D @D= FALSE;
     IF ( ^O^R^D^I^N^A^L >= 0 ) AND
        ( ^O^R^D^I^N^A^L <= ^O^U^T^P^U^T_^L^A^S^T_^O^R^D^I^N^A^L ) THEN
        ^N^O^D^E_^R^E^T^U^R^N^E^D @D= TRUE;
        ^T^O^T^A^L_^O^R^D^I^N^A^L^S @D= ^O^U^T^P^U^T_^L^A^S^T_^O^R^D^I^N^A^L;
        ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S @D= ^O^U^T^P^U^T_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S;
        ^L^E^N^G^T^H @D= ^O^U^T^P^U^T_^T^A^B^L^E[^O^R^D^I^N^A^L].^L^E^N^G^T^H;
        ^C^H^A^R^S @D= ^O^U^T^P^U^T_^T^A^B^L^E[^O^R^D^I^N^A^L].^C^H^A^R^S
     IFEND
  PROCEND ^D^U^M^P_^O^U^T^P^U^T_^N^O^D^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^S^T^O^R^E_^K^E^Y_^N^A^M^E_^N^O^D^E' ??
  ?? EJECT ??

  PROCEDURE [XDCL] ^S^T^O^R^E_^K^E^Y_^N^A^M^E_^N^O^D^E (^O^R^D^I^N^A^L@D ^O^R^D^I^N^A^L_^T^Y^P^E;
        ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H@D INTEGER;
        ^C^H^A^R_^S^E^Q^U^E^N^C^E@D STRING(*);
        VAR ^E^R^R^O^R_^R^E^T^U^R^N@D ^E^R^R^O^R_^T^Y^P^E);

     IF ( ^O^R^D^I^N^A^L < 0 ) OR
        ( ^O^R^D^I^N^A^L > ^K^E^Y_^N^A^M^E_^L^A^S^T_^O^R^D^I^N^A^L ) THEN
        ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^R^O^O^M_^E^R^R^O^R
     ELSE
        ^S^T^O^R^E_^O^R^D_^C^H^A^R_^N^O^D^E(^O^R^D^I^N^A^L, ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H, ^C^H^A^R_^S^E^Q^U^E^N^C^E,
           ^K^E^Y_^N^A^M^E_^T^A^B^L^E, ^K^E^Y_^N^A^M^E_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S, ^E^R^R^O^R_^R^E^T^U^R^N)
     IFEND
  PROCEND ^S^T^O^R^E_^K^E^Y_^N^A^M^E_^N^O^D^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^D^U^M^P_^K^E^Y_^N^A^M^E_^N^O^D^E' ??
  ?? SKIP @D= 4 ??

  PROCEDURE [XDCL] ^D^U^M^P_^K^E^Y_^N^A^M^E_^N^O^D^E(^O^R^D^I^N^A^L@D ^O^R^D^I^N^A^L_^T^Y^P^E;
        VAR ^L^E^N^G^T^H@D INTEGER;
        VAR ^C^H^A^R^S@D @BSTRING(*);
        VAR ^T^O^T^A^L_^O^R^D^I^N^A^L^S@D INTEGER;
        VAR ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S@D INTEGER;
        VAR ^N^O^D^E_^R^E^T^U^R^N^E^D@D BOOLEAN);

     ^N^O^D^E_^R^E^T^U^R^N^E^D @D= FALSE;
     IF ( ^O^R^D^I^N^A^L >= 0 ) AND
        ( ^O^R^D^I^N^A^L <= ^K^E^Y_^N^A^M^E_^L^A^S^T_^O^R^D^I^N^A^L ) THEN
        ^N^O^D^E_^R^E^T^U^R^N^E^D @D= TRUE;
        ^T^O^T^A^L_^O^R^D^I^N^A^L^S @D= ^K^E^Y_^N^A^M^E_^L^A^S^T_^O^R^D^I^N^A^L;
        ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S @D= ^K^E^Y_^N^A^M^E_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S;
        ^L^E^N^G^T^H @D= ^K^E^Y_^N^A^M^E_^T^A^B^L^E[^O^R^D^I^N^A^L].^L^E^N^G^T^H;
        ^C^H^A^R^S @D= ^K^E^Y_^N^A^M^E_^T^A^B^L^E[^O^R^D^I^N^A^L].^C^H^A^R^S
     IFEND
  PROCEND ^D^U^M^P_^K^E^Y_^N^A^M^E_^N^O^D^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^S^T^O^R^E_^R^E^S^E^T_^S^E^Q^U^E^N^C^E' ??
  ?? EJECT ??

  PROCEDURE [XDCL] ^S^T^O^R^E_^R^E^S^E^T_^S^E^Q^U^E^N^C^E (^O^R^D^I^N^A^L@D ^O^R^D^I^N^A^L_^T^Y^P^E;
        ^C^H^A^R_^S^E^Q_^L^E^N^G^T^H@D INTEGER;
        ^C^H^A^R_^S^E^Q@D STRING(*);
        VAR ^E^R^R^O^R_^R^E^T^U^R^N@D ^E^R^R^O^R_^T^Y^P^E);

     IF ( ^O^R^D^I^N^A^L < 0 ) OR
        ( ^O^R^D^I^N^A^L > ^I^N^I^T_^L^A^S^T_^O^R^D^I^N^A^L ) THEN
        ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^R^O^O^M_^E^R^R^O^R
     ELSE
        ^C^O^N^C^A^T^E^N^A^T^E_^S^E^Q^U^E^N^C^E^S(^C^H^A^R_^S^E^Q, ^C^H^A^R_^S^E^Q_^L^E^N^G^T^H,
           ^I^N^I^T_^T^A^B^L^E[^O^R^D^I^N^A^L], ^I^N^I^T_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S,
           ^E^R^R^O^R_^R^E^T^U^R^N);
     IFEND
  PROCEND ^S^T^O^R^E_^R^E^S^E^T_^S^E^Q^U^E^N^C^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^D^U^M^P_^R^E^S^E^T_^S^E^Q^U^E^N^C^E' ??
  ?? SKIP @D= 4 ??

  PROCEDURE [XDCL] ^D^U^M^P_^R^E^S^E^T_^S^E^Q^U^E^N^C^E(^O^R^D^I^N^A^L@D ^O^R^D^I^N^A^L_^T^Y^P^E;
        VAR ^L^E^N^G^T^H@D INTEGER;
        VAR ^C^H^A^R^S@D @BSTRING(*);
        VAR ^T^O^T^A^L_^O^R^D^I^N^A^L^S@D INTEGER;
        VAR ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S@D INTEGER;
        VAR ^N^O^D^E_^R^E^T^U^R^N^E^D@D BOOLEAN);

     ^N^O^D^E_^R^E^T^U^R^N^E^D @D= FALSE;
     IF ( ^O^R^D^I^N^A^L >= 0 ) AND
        ( ^O^R^D^I^N^A^L <= ^I^N^I^T_^L^A^S^T_^O^R^D^I^N^A^L ) THEN
        ^N^O^D^E_^R^E^T^U^R^N^E^D @D= TRUE;
        ^T^O^T^A^L_^O^R^D^I^N^A^L^S @D= ^I^N^I^T_^L^A^S^T_^O^R^D^I^N^A^L;
        ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S @D= ^I^N^I^T_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S;
        ^L^E^N^G^T^H @D= ^I^N^I^T_^T^A^B^L^E[^O^R^D^I^N^A^L].^L^E^N^G^T^H;
        ^C^H^A^R^S @D= ^I^N^I^T_^T^A^B^L^E[^O^R^D^I^N^A^L].^C^H^A^R^S
     IFEND
  PROCEND ^D^U^M^P_^R^E^S^E^T_^S^E^Q^U^E^N^C^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^S^T^O^R^E_^A^P^P^S^T^R_^N^O^D^E' ??
  ?? EJECT ??

  PROCEDURE [XDCL] ^S^T^O^R^E_^A^P^P^S^T^R_^N^O^D^E (^N^A^M^E@D STRING(*);
        ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H@D INTEGER;
        ^C^H^A^R_^S^E^Q^U^E^N^C^E@D STRING(*);
        VAR ^E^R^R^O^R_^R^E^T^U^R^N@D ^E^R^R^O^R_^T^Y^P^E);
     VAR
        ^N^E^W_^N^O^D^E@D @B^A^P^P^S^T^R_^N^O^D^E;

     ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^E^R^R^O^R;
     ALLOCATE ^N^E^W_^N^O^D^E;
     IF ^N^E^W_^N^O^D^E = NIL THEN
        ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^R^O^O^M_^E^R^R^O^R
     ELSE
        IF ^A^P^P^S^T^R_^T^A^B^L^E = NIL THEN
           ^A^P^P^S^T^R_^T^A^B^L^E @D= ^N^E^W_^N^O^D^E
        ELSE
           ^A^P^P^S^T^R_^L^A^T^E^S^T_^N^E^W_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D= ^N^E^W_^N^O^D^E
        IFEND;
        ^A^P^P^S^T^R_^L^A^T^E^S^T_^N^E^W_^N^O^D^E @D= ^N^E^W_^N^O^D^E;
        ^N^E^W_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D= NIL;
        ^N^E^W_^N^O^D^E@B.^N^A^M^E @D= ^N^A^M^E;
        ^N^E^W_^N^O^D^E@B.^V^A^L^U^E.^L^E^N^G^T^H @D= ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H;
        ^A^P^P^S^T^R_^T^O^T^A^L_^S^E^Q^U^E^N^C^E^S @D= ^A^P^P^S^T^R_^T^O^T^A^L_^S^E^Q^U^E^N^C^E^S + 1;
        IF ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H > 0 THEN
           ALLOCATE ^N^E^W_^N^O^D^E@B.^V^A^L^U^E.^C^H^A^R^S @D [ ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H ];
           IF ^N^E^W_^N^O^D^E@B.^V^A^L^U^E.^C^H^A^R^S = NIL THEN
              ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^R^O^O^M_^E^R^R^O^R
           ELSE
              ^N^E^W_^N^O^D^E@B.^V^A^L^U^E.^C^H^A^R^S@B @D= ^C^H^A^R_^S^E^Q^U^E^N^C^E(1,^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H);
              ^A^P^P^S^T^R_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S @D=
                 ^A^P^P^S^T^R_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S + ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H
           IFEND
        IFEND
     IFEND
  PROCEND ^S^T^O^R^E_^A^P^P^S^T^R_^N^O^D^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^R^E^S^E^T_^A^P^P^S^T^R_^T^A^B^L^E' ??
  ?? SKIP @D= 4 ??

  PROCEDURE [XDCL] ^R^E^S^E^T_^A^P^P^S^T^R_^T^A^B^L^E;
     ^A^P^P^S^T^R_^N^E^X^T_^N^O^D^E_^D^U^M^P^E^D @D= ^A^P^P^S^T^R_^T^A^B^L^E
  PROCEND ^R^E^S^E^T_^A^P^P^S^T^R_^T^A^B^L^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^D^U^M^P_^A^P^P^S^T^R_^N^O^D^E' ??
  ?? EJECT ??

  PROCEDURE [XDCL] ^D^U^M^P_^A^P^P^S^T^R_^N^O^D^E (VAR ^N^A^M^E@D STRING(*);
        VAR ^L^E^N^G^T^H@D INTEGER;
        VAR ^C^H^A^R^S@D @BSTRING(*);
        VAR ^T^O^T^A^L_^S^E^Q^U^E^N^C^E^S@D INTEGER;
        VAR ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S@D INTEGER;
        VAR ^N^O^D^E_^R^E^T^U^R^N^E^D@D BOOLEAN);

     IF ( ^A^P^P^S^T^R_^T^A^B^L^E = NIL ) OR
        ( ^A^P^P^S^T^R_^N^E^X^T_^N^O^D^E_^D^U^M^P^E^D = NIL ) THEN
        ^N^O^D^E_^R^E^T^U^R^N^E^D @D= FALSE
     ELSE
        ^N^O^D^E_^R^E^T^U^R^N^E^D @D= TRUE;
        ^N^A^M^E @D= ^A^P^P^S^T^R_^N^E^X^T_^N^O^D^E_^D^U^M^P^E^D@B.^N^A^M^E;
        ^L^E^N^G^T^H @D= ^A^P^P^S^T^R_^N^E^X^T_^N^O^D^E_^D^U^M^P^E^D@B.^V^A^L^U^E.^L^E^N^G^T^H;
        ^C^H^A^R^S @D= ^A^P^P^S^T^R_^N^E^X^T_^N^O^D^E_^D^U^M^P^E^D@B.^V^A^L^U^E.^C^H^A^R^S;
        ^A^P^P^S^T^R_^N^E^X^T_^N^O^D^E_^D^U^M^P^E^D @D= ^A^P^P^S^T^R_^N^E^X^T_^N^O^D^E_^D^U^M^P^E^D@B.^N^E^X^T_^N^O^D^E;
        ^T^O^T^A^L_^S^E^Q^U^E^N^C^E^S @D= ^A^P^P^S^T^R_^T^O^T^A^L_^S^E^Q^U^E^N^C^E^S;
        ^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S @D= ^A^P^P^S^T^R_^T^O^T^A^L_^C^H^A^R^A^C^T^E^R^S
     IFEND
  PROCEND ^D^U^M^P_^A^P^P^S^T^R_^N^O^D^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^S^T^O^R^E_^I^N^P^U^T_^N^O^D^E' ??
  ?? EJECT ??

  PROCEDURE [XDCL] ^S^T^O^R^E_^I^N^P^U^T_^N^O^D^E (^O^R^D^I^N^A^L@D ^O^R^D^I^N^A^L_^T^Y^P^E;
        ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H@D INTEGER;
        ^C^H^A^R_^S^E^Q^U^E^N^C^E@D STRING(*);
        VAR ^E^R^R^O^R_^R^E^T^U^R^N@D ^E^R^R^O^R_^T^Y^P^E);

     ^0 I^N^P^U^T ^C^H^A^R^A^C^T^E^R ^R^E^C^O^G^N^I^T^I^O^N ^S^E^Q^U^E^N^C^E^S ^A^R^E ^S^T^O^R^E^D ^I^N ^A ^T^R^E^E ^O^F ^L^I^N^K^E^D ^2
     ^0   ^L^I^S^T^S.  E^A^C^H ^C^H^A^R^A^C^T^E^R ^O^F ^A ^P^A^R^T^I^C^U^L^A^R ^S^E^Q^U^E^N^C^E ^O^C^C^U^P^I^E^S ^A ^N^O^D^E ^I^N ^2
     ^0   ^A ^D^I^F^F^E^R^E^N^T ^L^E^V^E^L ^O^F ^T^H^E ^T^R^E^E.  T^H^U^S, ^W^H^E^N ^M^A^T^C^H^I^N^G ^A ^S^E^Q^U^E^N^C^E ^I^N ^2
     ^0   ^T^H^E ^T^R^E^E, ^O^N^E ^W^O^U^L^D ^S^T^A^R^T ^A^T ^T^H^E ^F^I^R^S^T ^L^E^V^E^L (^P^O^I^N^T^E^D ^T^O ^B^Y   ^2
     ^0   ^I^N^P^U^T_^L^I^S^T), ^A^N^D ^S^E^A^R^C^H ^T^H^E ^L^I^N^K^E^D ^L^I^S^T ^W^H^I^C^H ^C^O^N^S^T^I^T^U^T^E^S ^T^H^A^T ^L^E^V^E^L ^
     ^0   (^U^S^I^N^G ^S^E^A^R^C^H_^L^E^V^E^L).  I^F ^T^H^E ^C^H^A^R^A^C^T^E^R ^I^S ^F^O^U^N^D, ^T^H^E ^P^R^O^C^E^S^S ^R^E^P^E^A^T^S^2
     ^0   ^W^I^T^H ^T^H^E ^N^E^X^T ^C^H^A^R^A^C^T^E^R ^I^N ^T^H^E ^S^E^Q^U^E^N^C^E, ^A^N^D ^T^H^E ^S^E^A^R^C^H ^I^S ^O^F ^T^H^E ^2
     ^0   ^L^E^V^E^L ^P^O^I^N^T^E^D ^T^O ^B^Y ^T^H^E ^N^O^D^E ^W^H^I^C^H ^W^A^S ^F^O^U^N^D.  ^2
     ^0 E^A^C^H ^L^E^V^E^L ^C^O^N^S^I^S^T^S ^O^F ^A ^L^I^N^K^E^D ^L^I^S^T ^O^F '^L^I^S^T' ^N^O^D^E^S, ^W^H^E^R^E ^E^A^C^H ^N^O^D^E ^2
     ^0   ^C^O^R^R^E^S^P^O^N^D^S ^T^O ^A ^S^I^N^G^L^E-^E^L^E^M^E^N^T ^L^I^S^T ^I^N ^T^H^E ^F^I^N^A^L ^O^U^T^P^U^T ^F^O^R^M^A^T.  ^2
     ^0   T^H^E^S^E ^L^I^S^T ^N^O^D^E^S ^A^R^E ^L^A^T^E^R ^C^O^M^B^I^N^E^D ^W^H^E^R^E ^P^O^S^S^I^B^L^E ^I^N^T^O ^R^A^N^G^E^S ^A^N^D ^2
     ^0   ^S^I^N^G^L^E-^A^C^T^I^O^N ^R^A^N^G^E^S ^B^Y ^T^H^E ^O^P^T^I^M^I^Z^E_^T^A^B^L^E^S ^P^R^O^C^E^D^U^R^E.  ^2
     ^0   T^H^E ^L^A^S^T ^N^O^D^E ^I^N ^E^A^C^H ^L^E^V^E^L'^S ^L^I^N^K^E^D ^L^I^S^T ^I^S ^A^L^W^A^Y^S ^A '^F^A^I^L' ^N^O^D^E. ^2

     VAR
        ^N^E^W_^N^O^D^E,
        ^P^R^E^D_^N^O^D^E,                    ^0 ^P^R^E^D^E^C^E^S^S^O^R ^T^O ^C^U^R^R^E^N^T ^N^O^D^E ^2
        ^S^U^C^C_^N^O^D^E,                    ^0 ^S^U^C^C^E^S^S^O^R ^T^O ^C^U^R^R^E^N^T ^N^O^D^E ^2
        ^P^R^E^V_^L^E^V^E^L,                   ^0 ^P^R^E^V^I^O^U^S ^L^E^V^E^L ^W^H^I^C^H ^P^O^I^N^T^S ^T^O ^C^U^R^R^E^N^T^2
        ^C^U^R^R_^L^E^V^E^L@D @B^I^N^P^U^T_^N^O^D^E,      ^0 ^S^T^A^R^T ^O^F ^T^H^E ^L^E^V^E^L ^T^O ^S^E^A^R^C^H ^2
        ^N^O^D^E_^F^O^U^N^D@D BOOLEAN,
        ^C^H^A^R_^N^D^X@D INTEGER;

     ?? NEWTITLE @D= '^S^E^A^R^C^H_^L^E^V^E^L' ??
     ?? SKIP @D= 4 ??

     PROCEDURE ^S^E^A^R^C^H_^L^E^V^E^L (^C^H@D CHAR; ^C^U^R^R_^L^E^V^E^L@D @B^I^N^P^U^T_^N^O^D^E;
           VAR ^P^R^E^D_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E; VAR ^S^U^C^C_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E;
           VAR ^N^O^D^E_^F^O^U^N^D@D BOOLEAN);
        ^0 T^H^I^S ^P^R^O^C^E^D^U^R^E ^S^E^A^R^C^H^E^S ^A ^P^A^R^T^I^C^U^L^A^R ^L^E^V^E^L ^O^F ^T^H^E ^I^N^P^U^T ^C^H^A^R ^T^R^E^E, ^2
        ^0   ^L^O^O^K^I^N^G ^F^O^R ^A ^N^O^D^E ^W^H^I^C^H ^C^O^N^T^A^I^N^S ^T^H^E ^G^I^V^E^N ^C^H^A^R^A^C^T^E^R.  I^F ^I^T ^2
        ^0   ^D^O^E^S^N'^T ^F^I^N^D ^O^N^E, ^I^T ^R^E^T^U^R^N^S ^P^O^I^N^T^E^R^S ^S^E^T ^U^P ^T^O ^I^N^S^E^R^T ^A ^N^E^W ^N^O^D^E ^2
        ^0   ^F^O^R ^T^H^A^T ^C^H^A^R^A^C^T^E^R ^I^N ^I^T^S ^P^R^O^P^E^R ^O^R^D^E^R. ^2

        ^N^O^D^E_^F^O^U^N^D @D= FALSE;
        ^P^R^E^D_^N^O^D^E @D= NIL;
        ^S^U^C^C_^N^O^D^E @D= ^C^U^R^R_^L^E^V^E^L;
        WHILE ( ^S^U^C^C_^N^O^D^E@B.^O^P^C^O^D^E <> ^F^A^I^L ) AND
              ( ^N^O^D^E_^F^O^U^N^D = FALSE ) AND
              ( ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^C^H^A^R^A^C^T^E^R <= ^C^H ) DO
           IF ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^C^H^A^R^A^C^T^E^R = ^C^H THEN
              ^N^O^D^E_^F^O^U^N^D @D= TRUE
           ELSE
              ^P^R^E^D_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E;
              ^S^U^C^C_^N^O^D^E @D= ^P^R^E^D_^N^O^D^E@B.^N^E^X^T_^N^O^D^E
           IFEND
        WHILEND
     PROCEND ^S^E^A^R^C^H_^L^E^V^E^L;
     ?? OLDTITLE ??
     ?? EJECT ??

     ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^E^R^R^O^R;
     ^C^U^R^R_^L^E^V^E^L @D= ^I^N^P^U^T_^L^I^S^T;
     FOR ^C^H^A^R_^N^D^X @D= 1 TO ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H DO
        ^S^E^A^R^C^H_^L^E^V^E^L(^C^H^A^R_^S^E^Q^U^E^N^C^E(^C^H^A^R_^N^D^X), ^C^U^R^R_^L^E^V^E^L,
           ^P^R^E^D_^N^O^D^E, ^S^U^C^C_^N^O^D^E, ^N^O^D^E_^F^O^U^N^D);
        IF ^N^O^D^E_^F^O^U^N^D THEN
           IF ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^O^R^D^I^N^A^L > ^N^O_^O^R^D^I^N^A^L THEN
              IF ^C^H^A^R_^N^D^X <> ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H THEN
                 ^E^R^R^O^R_^R^E^T^U^R^N @D= ^S^U^P^E^R^S^E^T_^E^R^R^O^R;
                 RETURN
              IFEND;
              ^E^R^R^O^R_^R^E^T^U^R^N @D= ^D^U^P^L^I^C^A^T^E_^I^N^P^U^T_^E^R^R^O^R;
              RETURN
           IFEND;
           IF ^C^H^A^R_^N^D^X = ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H THEN
              ^E^R^R^O^R_^R^E^T^U^R^N @D= ^S^U^B^S^E^T_^E^R^R^O^R;
              RETURN
           IFEND;
           ^P^R^E^V_^L^E^V^E^L @D= ^S^U^C^C_^N^O^D^E;
           ^C^U^R^R_^L^E^V^E^L @D=      ^0 ^P^O^I^N^T ^T^O ^N^E^X^T ^L^E^V^E^L ^I^N ^S^E^Q^U^E^N^C^E ^2
              ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L
        ELSE                          ^0 ^N^O ^M^A^T^C^H ^F^O^U^N^D, ^B^U^I^L^D ^A ^N^E^W ^N^O^D^E ^2
           ALLOCATE ^N^E^W_^N^O^D^E @D [ ^L^I^S^T ]; ^0 ^C^R^E^A^T^E ^A ^L^I^S^T ^N^O^D^E ^2
           IF ^P^R^E^D_^N^O^D^E = NIL THEN    ^0 ^N^E^V^E^R ^G^O^T ^P^A^S^T ^F^I^R^S^T ^N^O^D^E ^2
              IF ^C^H^A^R_^N^D^X = 1 THEN    ^0 ^F^I^R^S^T ^L^E^V^E^L ^O^N^L^Y ^2
                 ^N^E^W_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D= ^I^N^P^U^T_^L^I^S^T;
                 ^I^N^P^U^T_^L^I^S^T @D= ^N^E^W_^N^O^D^E
              ELSE                    ^0 ^B^E^Y^O^N^D ^F^I^R^S^T ^L^E^V^E^L ^2
                 ^N^E^W_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D=
                    ^P^R^E^V_^L^E^V^E^L@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L;
                 ^P^R^E^V_^L^E^V^E^L@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L @D= ^N^E^W_^N^O^D^E
              IFEND
           ELSE                       ^0 ^N^E^W ^N^O^D^E ^I^S ^I^N ^M^I^D^S^T ^O^F ^E^X^I^S^T^I^N^G ^L^E^V^E^L^2
              ^N^E^W_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D= ^P^R^E^D_^N^O^D^E@B.^N^E^X^T_^N^O^D^E;
              ^P^R^E^D_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D= ^N^E^W_^N^O^D^E;
           IFEND;
           ^N^E^W_^N^O^D^E@B.^O^F^F^S^E^T @D= 0;
           ^N^E^W_^N^O^D^E@B.^N^O^D^E_^V^I^S^I^T^E^D @D= FALSE;
           ^N^E^W_^N^O^D^E@B.^L^I^S^T_^C^H^A^R^A^C^T^E^R_^C^O^U^N^T @D= 1; ^0 ^O^N^E ^E^L^E^M^E^N^T ^I^N ^L^I^S^T ^2
           ALLOCATE ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R @D [ 1..1 ]; ^0 ^T^H^E ^L^I^S^T ^I^T^S^E^L^F ^2
           ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^C^H^A^R^A^C^T^E^R @D= ^C^H^A^R_^S^E^Q^U^E^N^C^E(^C^H^A^R_^N^D^X);
           ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^N^E^X^T_^O^F^F^S^E^T @D= 0;
           IF ^C^H^A^R_^N^D^X = ^S^E^Q^U^E^N^C^E_^L^E^N^G^T^H THEN
              ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^O^R^D^I^N^A^L @D= ^O^R^D^I^N^A^L;
              ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L @D= NIL
           ELSE
              ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^O^R^D^I^N^A^L @D= ^N^O_^O^R^D^I^N^A^L;
              ALLOCATE
                 ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L @D [ ^F^A^I^L ];
              ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L@B.^N^E^X^T_^N^O^D^E @D= NIL;
              ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L@B.^O^F^F^S^E^T @D= 0;
              ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L@B.
                 ^N^O^D^E_^V^I^S^I^T^E^D @D= FALSE;
              ^P^R^E^V_^L^E^V^E^L @D= ^N^E^W_^N^O^D^E;
              ^C^U^R^R_^L^E^V^E^L @D=
                 ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L
           IFEND
        IFEND
     FOREND
  PROCEND ^S^T^O^R^E_^I^N^P^U^T_^N^O^D^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^D^U^M^P_^I^N^P^U^T_^N^O^D^E' ??
  ?? SKIP @D= 4 ??

  PROCEDURE [XDCL] ^D^U^M^P_^I^N^P^U^T_^N^O^D^E (
        ^B^E^F^O^R^E_^P^R^O^C^E^D^U^R^E@D @BPROCEDURE(^I^N_^N^D@D @B^I^N^P^U^T_^N^O^D^E) );

     ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E(^I^N^P^U^T_^L^I^S^T, ^B^E^F^O^R^E_^P^R^O^C^E^D^U^R^E, NIL)
  PROCEND ^D^U^M^P_^I^N^P^U^T_^N^O^D^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^R^E^S^E^T_^I^N^P^U^T_^T^A^B^L^E' ??
  ?? SKIP @D= 4 ??

  PROCEDURE [XDCL] ^R^E^S^E^T_^I^N^P^U^T_^T^A^B^L^E (VAR ^C^H^A^R^A^C^T^E^R_^C^O^U^N^T@D INTEGER);

     PROCEDURE ^R^E^S^E^T_^N^O^D^E_^F^L^A^G^S(^I^N_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E);
        ^I^N_^N^O^D^E@B.^N^O^D^E_^V^I^S^I^T^E^D @D= FALSE;
        ^C^A^L^C^U^L^A^T^E_^I^N^P^U^T_^O^F^F^S^E^T^S(^I^N_^N^O^D^E)
     PROCEND ^R^E^S^E^T_^N^O^D^E_^F^L^A^G^S;

     ^I^N^P^U^T_^O^F^F^S^E^T @D= 0;
     ^D^U^M^P_^I^N^P^U^T_^N^O^D^E(@B^R^E^S^E^T_^N^O^D^E_^F^L^A^G^S);
     ^C^H^A^R^A^C^T^E^R_^C^O^U^N^T @D= ^I^N^P^U^T_^O^F^F^S^E^T
  PROCEND ^R^E^S^E^T_^I^N^P^U^T_^T^A^B^L^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E' ??
  ?? EJECT ??

  PROCEDURE ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E (  ^0 ^R^E^C^U^R^S^I^V^E^L^Y ^P^R^O^C^E^S^S ^T^R^E^E, ^C^A^L^L^I^N^G ^P^R^O^C^2
        ^I^N_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E;
        ^B^E^F^O^R^E_^P^R^O^C^E^D^U^R^E@D @BPROCEDURE(^I^N_^N^D@D @B^I^N^P^U^T_^N^O^D^E);
        ^A^F^T^E^R_^P^R^O^C^E^D^U^R^E@D @BPROCEDURE(^I^N_^N^D@D @B^I^N^P^U^T_^N^O^D^E) );

     VAR
        ^A^C^T^I^O^N_^N^D^X@D INTEGER;

     IF ^I^N_^N^O^D^E <> NIL THEN
        IF ^B^E^F^O^R^E_^P^R^O^C^E^D^U^R^E <> NIL THEN
           ^B^E^F^O^R^E_^P^R^O^C^E^D^U^R^E@B(^I^N_^N^O^D^E) ^0 ^D^O ^W^H^A^T^E^V^E^R ^M^Y ^C^A^L^L^E^R ^R^E^Q^U^E^S^T^S ^2
        IFEND;
        CASE ^I^N_^N^O^D^E@B.^O^P^C^O^D^E OF
           = ^F^A^I^L =
              ;
           = ^L^I^S^T =
              ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E(^I^N_^N^O^D^E@B.^N^E^X^T_^N^O^D^E, ^0 ^S^A^M^E ^L^E^V^E^L ^F^I^R^S^T ^2
                 ^B^E^F^O^R^E_^P^R^O^C^E^D^U^R^E, ^A^F^T^E^R_^P^R^O^C^E^D^U^R^E);
              FOR ^A^C^T^I^O^N_^N^D^X @D= 1 TO ^I^N_^N^O^D^E@B.^L^I^S^T_^C^H^A^R^A^C^T^E^R_^C^O^U^N^T DO
                 ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E(    ^0 ^N^O^W ^T^H^E ^N^E^X^T ^L^E^V^E^L ^2
                    ^I^N_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].
                       ^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L,
                    ^B^E^F^O^R^E_^P^R^O^C^E^D^U^R^E, ^A^F^T^E^R_^P^R^O^C^E^D^U^R^E)
              FOREND;
           = ^R^A^N^G^E =
              ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E(^I^N_^N^O^D^E@B.^N^E^X^T_^N^O^D^E,
                 ^B^E^F^O^R^E_^P^R^O^C^E^D^U^R^E, ^A^F^T^E^R_^P^R^O^C^E^D^U^R^E);
              FOR ^A^C^T^I^O^N_^N^D^X @D= ORD(^I^N_^N^O^D^E@B.^R^A^N^G^E_^L^O^W^E^R_^B^O^U^N^D) TO
                                ORD(^I^N_^N^O^D^E@B.^R^A^N^G^E_^U^P^P^E^R_^B^O^U^N^D) DO
                 ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E(
                    ^I^N_^N^O^D^E@B.^R^A^N^G^E_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^N^E^X^T_^L^E^V^E^L,
                    ^B^E^F^O^R^E_^P^R^O^C^E^D^U^R^E, ^A^F^T^E^R_^P^R^O^C^E^D^U^R^E)
              FOREND;
           = ^S^I^N^G^L^E_^A^C^T^I^O^N_^R^A^N^G^E =
              ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E(^I^N_^N^O^D^E@B.^N^E^X^T_^N^O^D^E,
                 ^B^E^F^O^R^E_^P^R^O^C^E^D^U^R^E, ^A^F^T^E^R_^P^R^O^C^E^D^U^R^E);
              ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E(
                 ^I^N_^N^O^D^E@B.^S^A^R_^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L,
                 ^B^E^F^O^R^E_^P^R^O^C^E^D^U^R^E, ^A^F^T^E^R_^P^R^O^C^E^D^U^R^E);
        CASEND;
        IF ^A^F^T^E^R_^P^R^O^C^E^D^U^R^E <> NIL THEN
           ^A^F^T^E^R_^P^R^O^C^E^D^U^R^E@B(^I^N_^N^O^D^E)  ^0 ^D^O ^W^H^A^T^E^V^E^R ^D^E^S^I^R^E^D ^A^F^T^E^R ^T^R^A^V^E^R^S^A^L ^2
        IFEND
     IFEND
  PROCEND ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^C^A^L^C^U^L^A^T^E_^I^N^P^U^T_^O^F^F^S^E^T^S' ??
  ?? EJECT ??

  PROCEDURE ^C^A^L^C^U^L^A^T^E_^I^N^P^U^T_^O^F^F^S^E^T^S (^I^N_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E);

     ^I^N_^N^O^D^E@B.^O^F^F^S^E^T @D= ^I^N^P^U^T_^O^F^F^S^E^T;
     CASE ^I^N_^N^O^D^E@B.^O^P^C^O^D^E OF
        = ^F^A^I^L =
           ^I^N^P^U^T_^O^F^F^S^E^T @D= ^I^N^P^U^T_^O^F^F^S^E^T + 1;
        = ^L^I^S^T =
           ^I^N^P^U^T_^O^F^F^S^E^T @D= ^I^N^P^U^T_^O^F^F^S^E^T + 2 +
              ( ^I^N_^N^O^D^E@B.^L^I^S^T_^C^H^A^R^A^C^T^E^R_^C^O^U^N^T * 3 );
        = ^R^A^N^G^E =
           ^I^N^P^U^T_^O^F^F^S^E^T @D= ^I^N^P^U^T_^O^F^F^S^E^T + 3 + (
              ( ( ORD(^I^N_^N^O^D^E@B.^R^A^N^G^E_^U^P^P^E^R_^B^O^U^N^D) -
                  ORD(^I^N_^N^O^D^E@B.^R^A^N^G^E_^L^O^W^E^R_^B^O^U^N^D) ) + 1 ) * 2 );
        = ^S^I^N^G^L^E_^A^C^T^I^O^N_^R^A^N^G^E =
           ^I^N^P^U^T_^O^F^F^S^E^T @D= ^I^N^P^U^T_^O^F^F^S^E^T + 5;
     CASEND
  PROCEND ^C^A^L^C^U^L^A^T^E_^I^N^P^U^T_^O^F^F^S^E^T^S;
  ?? OLDTITLE ??

  ?? NEWTITLE @D= '^O^P^T^I^M^I^Z^E_^T^A^B^L^E^S' ??
  ?? EJECT ??

  PROCEDURE [XDCL] ^O^P^T^I^M^I^Z^E_^T^A^B^L^E^S;
     VAR
        ^N^E^X^T_^O^R^D^I^N^A^L@D ^O^R^D^I^N^A^L_^T^Y^P^E,
        ^N^O^D^E_^R^E^T^U^R^N^E^D@D BOOLEAN,
        ^E^R^R^O^R_^R^E^T^U^R^N@D ^E^R^R^O^R_^T^Y^P^E;

     ?? NEWTITLE @D= '^C^R^E^A^T^E_^R^A^N^G^E^S' ??
     ?? SKIP @D= 4 ??

     PROCEDURE ^C^R^E^A^T^E_^R^A^N^G^E^S (^I^N_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E);
        VAR
           ^A^C^T^I^O^N_^N^D^X@D INTEGER;

        IF ^I^N_^N^O^D^E <> NIL THEN
           CASE ^I^N_^N^O^D^E@B.^O^P^C^O^D^E OF
              = ^F^A^I^L =
                 ;
              = ^L^I^S^T =
                 FOR ^A^C^T^I^O^N_^N^D^X @D= 1 TO ^I^N_^N^O^D^E@B.^L^I^S^T_^C^H^A^R^A^C^T^E^R_^C^O^U^N^T DO
                    IF ^I^N_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L <>
                       NIL THEN
                       ^C^R^E^A^T^E_^R^A^N^G^E_^L^E^V^E^L(
                          ^I^N_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L)
                    IFEND
                 FOREND;
              = ^R^A^N^G^E =
                 FOR ^A^C^T^I^O^N_^N^D^X @D= ORD(^I^N_^N^O^D^E@B.^R^A^N^G^E_^L^O^W^E^R_^B^O^U^N^D) TO
                                   ORD(^I^N_^N^O^D^E@B.^R^A^N^G^E_^U^P^P^E^R_^B^O^U^N^D) DO
                    IF ^I^N_^N^O^D^E@B.^R^A^N^G^E_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^N^E^X^T_^L^E^V^E^L <> NIL
                       THEN
                       ^C^R^E^A^T^E_^R^A^N^G^E_^L^E^V^E^L(
                          ^I^N_^N^O^D^E@B.^R^A^N^G^E_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^N^E^X^T_^L^E^V^E^L)
                    IFEND
                 FOREND;
              = ^S^I^N^G^L^E_^A^C^T^I^O^N_^R^A^N^G^E =
                 IF ^I^N_^N^O^D^E@B.^S^A^R_^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L <> NIL THEN
                    ^C^R^E^A^T^E_^R^A^N^G^E_^L^E^V^E^L(^I^N_^N^O^D^E@B.^S^A^R_^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L)
                 IFEND
           CASEND
        IFEND
     PROCEND ^C^R^E^A^T^E_^R^A^N^G^E^S;
     ?? OLDTITLE ??

     ?? NEWTITLE @D= '^C^R^E^A^T^E_^R^A^N^G^E_^L^E^V^E^L' ??
     ?? EJECT ??

     PROCEDURE ^C^R^E^A^T^E_^R^A^N^G^E_^L^E^V^E^L (VAR ^C^U^R^R_^L^E^V^E^L@D @B^I^N^P^U^T_^N^O^D^E);
        ^0 T^H^I^S ^P^R^O^C^E^D^U^R^E ^S^C^A^N^S ^A^C^R^O^S^S ^A ^G^I^V^E^N ^L^E^V^E^L ^O^F ^T^H^E ^I^N^P^U^T ^T^R^E^E, ^2
        ^0   ^A^T^T^E^M^P^T^I^N^G ^T^O ^R^E^D^U^C^E ^C^O^N^S^E^C^U^T^I^V^E ^L^I^S^T^S ^O^F ^C^H^A^R^A^C^T^E^R^S ^T^O ^R^A^N^G^E^S. ^2
        ^0 I^T ASSUMES ^I^T ^I^S ^B^E^I^N^G ^C^A^L^L^E^D ^A^S ^T^H^E FIRST ^P^H^A^S^E ^O^F ^I^N^P^U^T ^T^A^B^L^E ^2
        ^0   ^O^P^T^I^M^I^Z^A^T^I^O^N, ^S^O ^T^H^A^T ^E^A^C^H ^L^E^V^E^L ^C^O^N^S^I^S^T^S ^O^F ^S^I^N^G^L^E-^I^T^E^M ^L^I^S^T^S ^2
        ^0   ONLY, ^A^N^D ^T^H^A^T ^T^H^E ^L^I^S^T^S ^A^R^E ^I^N ASCENDING ORDER. ^2

        VAR
           ^N^E^W_^N^O^D^E,
           ^P^R^E^D_^N^O^D^E,
           ^S^U^C^C_^N^O^D^E,
           ^L^O^W_^N^O^D^E,
           ^L^O^W_^N^O^D^E_^P^R^E^D,
           ^N^E^W_^L^O^W_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E,
           ^L^O^W,
           ^H^I^G^H@D CHAR,
           ^R^A^N^G^E_^N^D^X@D INTEGER;

        IF ^C^U^R^R_^L^E^V^E^L@B.^O^P^C^O^D^E = ^L^I^S^T THEN ^0 ^J^U^S^T ^I^N ^C^A^S^E ^O^F ^E^M^P^T^Y ^T^A^B^L^E ^2
           ^L^O^W @D= ^C^U^R^R_^L^E^V^E^L@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^C^H^A^R^A^C^T^E^R
        IFEND;
        ^H^I^G^H @D= ^L^O^W;
        ^L^O^W_^N^O^D^E @D= ^C^U^R^R_^L^E^V^E^L;
        ^S^U^C^C_^N^O^D^E @D= ^C^U^R^R_^L^E^V^E^L;
        ^P^R^E^D_^N^O^D^E @D= NIL;
        WHILE ( ^S^U^C^C_^N^O^D^E <> NIL ) AND
              ( ^E^R^R^O^R_^R^E^T^U^R^N = ^N^O_^E^R^R^O^R ) DO
           IF ( ^S^U^C^C_^N^O^D^E@B.^O^P^C^O^D^E <> ^F^A^I^L ) AND
              ( ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^C^H^A^R^A^C^T^E^R = SUCC(^H^I^G^H) ) THEN
              ^H^I^G^H @D= ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^C^H^A^R^A^C^T^E^R ^0 ^E^X^T^E^N^D ^R^A^N^G^E ^2
           ELSEIF ^L^O^W = ^H^I^G^H THEN     ^0 '^O^R^P^H^A^N' ^L^I^S^T--^R^E^S^E^T ^S^E^A^R^C^H ^P^T^R^S ^2
              IF ^S^U^C^C_^N^O^D^E@B.^O^P^C^O^D^E = ^L^I^S^T THEN
                 ^L^O^W @D= ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^C^H^A^R^A^C^T^E^R;
                 ^H^I^G^H @D= ^L^O^W;
                 ^L^O^W_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E;
                 ^L^O^W_^N^O^D^E_^P^R^E^D @D= ^P^R^E^D_^N^O^D^E
              IFEND
           ELSE                       ^0 ^A^T ^L^E^A^S^T 2 ^C^O^N^S^E^C^U^T^I^V^E ^N^O^D^E^S ^F^O^U^N^D ^2
              ALLOCATE ^N^E^W_^N^O^D^E @D [ ^R^A^N^G^E ];
              IF ^N^E^W_^N^O^D^E = NIL THEN
                 ^O^S^P$^S^E^T_^S^T^A^T^U^S_^A^B^N^O^R^M^A^L(^T^D^C_^P^R^O^D_^C^O^D^E,
                    ^T^D^E_^O^P^T^I^M^I^Z^E_^T^A^B^L^E_^F^U^L^L, '', ^S^T^A^T^U^S);
                 ^E^R^R^O^R_^S^T^A^T^U^S(^S^T^A^T^U^S);
                 ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^R^O^O^M_^E^R^R^O^R;
                 RETURN
              IFEND;
              ^N^E^W_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E; ^0 ^N^E^W ^R^A^N^G^E ^I^N ^S^A^M^E ^S^P^O^T^2
              ^N^E^W_^N^O^D^E@B.^O^F^F^S^E^T @D= 0;
              ^N^E^W_^N^O^D^E@B.^N^O^D^E_^V^I^S^I^T^E^D @D= FALSE;
              IF ^L^O^W_^N^O^D^E = ^C^U^R^R_^L^E^V^E^L THEN ^0 ^N^E^W ^N^O^D^E ^I^S ^F^I^R^S^T ^O^N ^L^E^V^E^L^2
                 ^C^U^R^R_^L^E^V^E^L @D= ^N^E^W_^N^O^D^E ^0 ^R^E^T^U^R^N ^P^O^I^N^T^E^R ^T^O ^M^Y ^C^A^L^L^E^R ^2
              ELSE
                 ^L^O^W_^N^O^D^E_^P^R^E^D@B.^N^E^X^T_^N^O^D^E @D= ^N^E^W_^N^O^D^E
              IFEND;
              ^N^E^W_^N^O^D^E@B.^R^A^N^G^E_^L^O^W^E^R_^B^O^U^N^D @D= ^L^O^W;
              ^N^E^W_^N^O^D^E@B.^R^A^N^G^E_^U^P^P^E^R_^B^O^U^N^D @D= ^H^I^G^H;
              ALLOCATE ^N^E^W_^N^O^D^E@B.^R^A^N^G^E_^P^O^I^N^T^E^R @D [ ORD(^L^O^W)..ORD(^H^I^G^H) ];
              IF ^N^E^W_^N^O^D^E@B.^R^A^N^G^E_^P^O^I^N^T^E^R = NIL THEN
                 ^O^S^P$^S^E^T_^S^T^A^T^U^S_^A^B^N^O^R^M^A^L(^T^D^C_^P^R^O^D_^C^O^D^E,
                    ^T^D^E_^O^P^T^I^M^I^Z^E_^T^A^B^L^E_^F^U^L^L, '', ^S^T^A^T^U^S);
                 ^E^R^R^O^R_^S^T^A^T^U^S(^S^T^A^T^U^S);
                 ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^R^O^O^M_^E^R^R^O^R;
                 RETURN
              IFEND;
              FOR ^R^A^N^G^E_^N^D^X @D= ORD(^L^O^W) TO ORD(^H^I^G^H) DO
                 ^N^E^W_^N^O^D^E@B.^R^A^N^G^E_^P^O^I^N^T^E^R@B[^R^A^N^G^E_^N^D^X] @D=
                    ^L^O^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^A^C^T^I^O^N;
                 ^N^E^W_^L^O^W_^N^O^D^E @D= ^L^O^W_^N^O^D^E@B.^N^E^X^T_^N^O^D^E;
                 FREE ^L^O^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R;
                 FREE ^L^O^W_^N^O^D^E;
                 ^L^O^W_^N^O^D^E @D= ^N^E^W_^L^O^W_^N^O^D^E
              FOREND;
              IF ^S^U^C^C_^N^O^D^E@B.^O^P^C^O^D^E = ^L^I^S^T THEN
                 ^L^O^W @D= ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^C^H^A^R^A^C^T^E^R;
                 ^H^I^G^H @D= ^L^O^W;
                 ^L^O^W_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E;
                 ^L^O^W_^N^O^D^E_^P^R^E^D @D= ^N^E^W_^N^O^D^E
              IFEND
           IFEND;
           ^P^R^E^D_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E;
           IF ^S^U^C^C_^N^O^D^E@B.^O^P^C^O^D^E = ^F^A^I^L THEN
              ^S^U^C^C_^N^O^D^E @D= NIL
           ELSE
              ^S^U^C^C_^N^O^D^E @D= ^P^R^E^D_^N^O^D^E@B.^N^E^X^T_^N^O^D^E
           IFEND
        WHILEND
     PROCEND ^C^R^E^A^T^E_^R^A^N^G^E_^L^E^V^E^L;
     ?? OLDTITLE ??

     ?? NEWTITLE @D= '^I^N^S^E^R^T_^R^E^M^A^I^N^I^N^G_^C^H^A^R^S' ??
     ?? EJECT ??

     PROCEDURE ^I^N^S^E^R^T_^R^E^M^A^I^N^I^N^G_^C^H^A^R^S;
        ^0 T^H^I^S ^P^R^O^C^E^D^U^R^E ^P^R^O^C^E^S^S^E^S ^T^H^E ^F^I^R^S^T ^L^E^V^E^L ^O^F ^T^H^E ^I^N^P^U^T ^T^R^E^E ^O^N^L^Y, ^2
        ^0   ^A^D^D^I^N^G ^A^L^L ^C^H^A^R^A^C^T^E^R^S ^T^H^A^T ^A^R^E ^N^O^T ^Y^E^T ^R^E^P^R^E^S^E^N^T^E^D ^T^H^E^R^E.  T^H^I^S ^2
        ^0   ^I^S ^N^E^C^E^S^S^A^R^Y ^B^E^C^A^U^S^E ^W^E ^C^A^N ^M^A^K^E ^N^O ^A^S^S^U^M^P^T^I^O^N^S ^A^B^O^U^T ^W^H^I^C^H ^2
        ^0   ^C^H^A^R^A^C^T^E^R^S ^T^H^E ^A^P^P^L^I^C^A^T^I^O^N ^P^R^O^G^R^A^M ^W^A^N^T^S ^T^O ^S^E^E.  W^E ^W^I^L^L ^P^A^S^S ^2
        ^0   ^E^V^E^R^Y^T^H^I^N^G ^T^O ^T^H^E ^A^P^P, ^A^N^D ^L^E^T ^I^T ^D^E^C^I^D^E ^W^H^A^T ^T^O ^D^O. ^2
        ^0 A^T ^T^H^E ^T^I^M^E ^T^H^I^S ^P^R^O^C^E^D^U^R^E ^I^S ^C^A^L^L^E^D, ^I^T ASSUMES ^T^H^A^T ^T^H^E ^F^I^R^S^T ^2
        ^0   ^L^E^V^E^L ^C^O^N^S^I^S^T^S ONLY ^O^F ^R^A^N^G^E^S ^A^N^D ^L^I^S^T^S, ^A^N^D ^T^H^A^T ^E^V^E^R^Y^T^H^I^N^G ^2
        ^0   ^I^S ^S^T^I^L^L ^I^N ASCENDING ORDER. ^2

        VAR
           ^P^R^E^D_^N^O^D^E,
           ^S^U^C^C_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E,
           ^F^I^R^S^T_^N^E^E^D^E^D@D 0 .. 129;

        ?? NEWTITLE @D= '^M^A^Y^B^E_^I^N^S^E^R^T_^C^H^A^R^S' ??
        ?? EJECT ??

        PROCEDURE ^M^A^Y^B^E_^I^N^S^E^R^T_^C^H^A^R^S (^N^E^X^T_^U^S^E^D@D 0 .. 128;
              ^S^U^C^C_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E;
              VAR ^P^R^E^D_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E;
              VAR ^F^I^R^S^T_^N^E^E^D^E^D@D 0 .. 129);

           VAR
              ^N^E^W_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E;

           IF ^N^E^X^T_^U^S^E^D > ^F^I^R^S^T_^N^E^E^D^E^D THEN
              ALLOCATE ^N^E^W_^N^O^D^E @D [ ^S^I^N^G^L^E_^A^C^T^I^O^N_^R^A^N^G^E ];
              IF ^N^E^W_^N^O^D^E = NIL THEN
                 ^O^S^P$^S^E^T_^S^T^A^T^U^S_^A^B^N^O^R^M^A^L(^T^D^C_^P^R^O^D_^C^O^D^E,
                    ^T^D^E_^O^P^T^I^M^I^Z^E_^T^A^B^L^E_^F^U^L^L, '', ^S^T^A^T^U^S);
                 ^E^R^R^O^R_^S^T^A^T^U^S(^S^T^A^T^U^S);
                 ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^R^O^O^M_^E^R^R^O^R;
              ELSE
                 ^N^E^W_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E;
                 ^N^E^W_^N^O^D^E@B.^O^F^F^S^E^T @D= 0;
                 ^N^E^W_^N^O^D^E@B.^N^O^D^E_^V^I^S^I^T^E^D @D= FALSE;
                 IF ^P^R^E^D_^N^O^D^E = NIL THEN
                    ^I^N^P^U^T_^L^I^S^T @D= ^N^E^W_^N^O^D^E
                 ELSE
                    ^P^R^E^D_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D= ^N^E^W_^N^O^D^E
                 IFEND;
                 ^P^R^E^D_^N^O^D^E @D= ^N^E^W_^N^O^D^E;
                 ^N^E^W_^N^O^D^E@B.^S^A^R_^L^O^W^E^R_^B^O^U^N^D @D= CHR(^F^I^R^S^T_^N^E^E^D^E^D);
                 ^N^E^W_^N^O^D^E@B.^S^A^R_^U^P^P^E^R_^B^O^U^N^D @D= CHR(^N^E^X^T_^U^S^E^D - 1);
                 ^N^E^W_^N^O^D^E@B.^S^A^R_^A^C^T^I^O^N.^O^R^D^I^N^A^L @D= ^O^V^E^R^S^T^R^I^K^E_^O^R^D^I^N^A^L;
                 ^N^E^W_^N^O^D^E@B.^S^A^R_^A^C^T^I^O^N.^N^E^X^T_^O^F^F^S^E^T @D= 0;
                 ^N^E^W_^N^O^D^E@B.^S^A^R_^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L @D= NIL
              IFEND
           IFEND;
           ^F^I^R^S^T_^N^E^E^D^E^D @D= ^N^E^X^T_^U^S^E^D + 1
        PROCEND ^M^A^Y^B^E_^I^N^S^E^R^T_^C^H^A^R^S;
        ?? OLDTITLE ??

        ^S^U^C^C_^N^O^D^E @D= ^I^N^P^U^T_^L^I^S^T;
        ^P^R^E^D_^N^O^D^E @D= NIL;
        ^F^I^R^S^T_^N^E^E^D^E^D @D= 0;
        WHILE ^F^I^R^S^T_^N^E^E^D^E^D < 128 DO
           CASE ^S^U^C^C_^N^O^D^E@B.^O^P^C^O^D^E OF
              = ^F^A^I^L =
                 ^M^A^Y^B^E_^I^N^S^E^R^T_^C^H^A^R^S(128, ^S^U^C^C_^N^O^D^E, ^P^R^E^D_^N^O^D^E, ^F^I^R^S^T_^N^E^E^D^E^D);
              = ^L^I^S^T =
                 ^M^A^Y^B^E_^I^N^S^E^R^T_^C^H^A^R^S(
                    ORD(^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[1].^C^H^A^R^A^C^T^E^R),
                    ^S^U^C^C_^N^O^D^E, ^P^R^E^D_^N^O^D^E, ^F^I^R^S^T_^N^E^E^D^E^D);
                 ^F^I^R^S^T_^N^E^E^D^E^D @D= 1 + ORD(^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B
                    [^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^C^H^A^R^A^C^T^E^R_^C^O^U^N^T].^C^H^A^R^A^C^T^E^R);
              = ^R^A^N^G^E =
                 ^M^A^Y^B^E_^I^N^S^E^R^T_^C^H^A^R^S(ORD(^S^U^C^C_^N^O^D^E@B.^R^A^N^G^E_^L^O^W^E^R_^B^O^U^N^D),
                    ^S^U^C^C_^N^O^D^E, ^P^R^E^D_^N^O^D^E, ^F^I^R^S^T_^N^E^E^D^E^D);
                 ^F^I^R^S^T_^N^E^E^D^E^D @D= 1 + ORD(^S^U^C^C_^N^O^D^E@B.^R^A^N^G^E_^U^P^P^E^R_^B^O^U^N^D);
           CASEND;
           ^P^R^E^D_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E;
           ^S^U^C^C_^N^O^D^E @D= ^P^R^E^D_^N^O^D^E@B.^N^E^X^T_^N^O^D^E
        WHILEND
     PROCEND ^I^N^S^E^R^T_^R^E^M^A^I^N^I^N^G_^C^H^A^R^S;
     ?? OLDTITLE ??

     ?? NEWTITLE @D= '^C^O^M^B^I^N^E_^L^I^S^T^S' ??
     ?? EJECT ??

     PROCEDURE ^C^O^M^B^I^N^E_^L^I^S^T^S (^I^N_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E);
        ^0 T^H^I^S ^P^R^O^C^E^D^U^R^E ^P^R^O^C^E^S^S^E^S ^A^L^L ^L^E^V^E^L^S ^O^F ^T^H^E ^I^N^P^U^T ^T^R^E^E, ^C^O^M^B^I^N^I^N^G ^2
        ^0   ^M^U^L^T^I^P^L^E ^L^I^S^T ^N^O^D^E^S ^A^T ^E^A^C^H ^L^E^V^E^L ^I^N^T^O ^A ^S^I^N^G^L^E ^L^I^S^T ^N^O^D^E. ^2
        ^0 I^T ^I^S ^C^A^L^L^E^D ^R^E^C^U^R^S^I^V^E^L^Y ^B^Y ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E. ^2

        VAR
           ^A^C^T^I^O^N_^N^D^X@D INTEGER;

        IF ^I^N_^N^O^D^E <> NIL THEN
           CASE ^I^N_^N^O^D^E@B.^O^P^C^O^D^E OF
              = ^F^A^I^L =
                 ;
              = ^L^I^S^T =
                 FOR ^A^C^T^I^O^N_^N^D^X @D= 1 TO ^I^N_^N^O^D^E@B.^L^I^S^T_^C^H^A^R^A^C^T^E^R_^C^O^U^N^T DO
                    IF ^I^N_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L <>
                       NIL THEN
                       ^C^O^M^B^I^N^E_^L^I^S^T_^L^E^V^E^L(
                          ^I^N_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L)
                    IFEND
                 FOREND;
              = ^R^A^N^G^E =
                 FOR ^A^C^T^I^O^N_^N^D^X @D= ORD(^I^N_^N^O^D^E@B.^R^A^N^G^E_^L^O^W^E^R_^B^O^U^N^D) TO
                                   ORD(^I^N_^N^O^D^E@B.^R^A^N^G^E_^U^P^P^E^R_^B^O^U^N^D) DO
                    IF ^I^N_^N^O^D^E@B.^R^A^N^G^E_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^N^E^X^T_^L^E^V^E^L <> NIL
                       THEN
                       ^C^O^M^B^I^N^E_^L^I^S^T_^L^E^V^E^L(
                          ^I^N_^N^O^D^E@B.^R^A^N^G^E_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^N^E^X^T_^L^E^V^E^L)
                    IFEND
                 FOREND;
              = ^S^I^N^G^L^E_^A^C^T^I^O^N_^R^A^N^G^E =
                 IF ^I^N_^N^O^D^E@B.^S^A^R_^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L <> NIL THEN
                    ^C^O^M^B^I^N^E_^L^I^S^T_^L^E^V^E^L(^I^N_^N^O^D^E@B.^S^A^R_^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L)
                 IFEND
           CASEND
        IFEND
     PROCEND ^C^O^M^B^I^N^E_^L^I^S^T^S;
     ?? OLDTITLE ??

     ?? NEWTITLE @D= '^C^O^M^B^I^N^E_^L^I^S^T_^L^E^V^E^L' ??
     ?? EJECT ??

     PROCEDURE ^C^O^M^B^I^N^E_^L^I^S^T_^L^E^V^E^L (VAR ^C^U^R^R_^L^E^V^E^L@D @B^I^N^P^U^T_^N^O^D^E);
        ^0 T^H^I^S ^P^R^O^C^E^D^U^R^E ^S^C^A^N^S ^A^C^R^O^S^S ^A ^G^I^V^E^N ^L^E^V^E^L ^O^F ^T^H^E ^I^N^P^U^T ^T^R^E^E, ^2
        ^0   ^C^O^M^B^I^N^I^N^G ^A^L^L ^S^E^P^A^R^A^T^E ^L^I^S^T^S ^F^O^U^N^D ^A^T ^T^H^A^T ^L^E^V^E^L ^I^N^T^O ^A ^S^I^N^G^L^E ^2
        ^0   ^L^I^S^T.  I^T ^D^O^E^S^N'^T ^R^E^A^L^L^Y ^C^A^R^E ^A^T ^W^H^A^T ^P^H^A^S^E ^O^F ^T^H^E ^O^P^T^I^M^I^Z^A^T^I^O^N ^2
        ^0   ^I^T ^I^S ^B^E^I^N^G ^C^A^L^L^E^D. ^2

        VAR
           ^N^E^W_^N^O^D^E,
           ^P^R^E^D_^N^O^D^E,
           ^S^U^C^C_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E,
           ^L^I^S^T_^C^O^U^N^T,
           ^N^E^W_^N^D^X,
           ^O^L^D_^N^D^X@D INTEGER;

        ^S^U^C^C_^N^O^D^E @D= ^C^U^R^R_^L^E^V^E^L;
        ^P^R^E^D_^N^O^D^E @D= NIL;
        ^L^I^S^T_^C^O^U^N^T @D= 0;
        WHILE ^S^U^C^C_^N^O^D^E@B.^O^P^C^O^D^E <> ^F^A^I^L DO
           IF ^S^U^C^C_^N^O^D^E@B.^O^P^C^O^D^E = ^L^I^S^T THEN
              ^L^I^S^T_^C^O^U^N^T @D= ^L^I^S^T_^C^O^U^N^T + ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^C^H^A^R^A^C^T^E^R_^C^O^U^N^T
           IFEND;
           ^P^R^E^D_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E;
           ^S^U^C^C_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E@B.^N^E^X^T_^N^O^D^E
        WHILEND;
        IF ^L^I^S^T_^C^O^U^N^T > 0 THEN        ^0 ^A^T ^L^E^A^S^T ^O^N^E ^L^I^S^T ^O^N ^T^H^I^S ^L^E^V^E^L ^2
           ALLOCATE ^N^E^W_^N^O^D^E @D [ ^L^I^S^T ];
           IF ^N^E^W_^N^O^D^E = NIL THEN
              ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^R^O^O^M_^E^R^R^O^R;
              ^O^S^P$^S^E^T_^S^T^A^T^U^S_^A^B^N^O^R^M^A^L(^T^D^C_^P^R^O^D_^C^O^D^E, ^T^D^E_^O^P^T^I^M^I^Z^E_^T^A^B^L^E_^F^U^L^L,
                 '', ^S^T^A^T^U^S);
              ^E^R^R^O^R_^S^T^A^T^U^S(^S^T^A^T^U^S);
              RETURN
           IFEND;
           ^N^E^W_^N^O^D^E@B.^O^F^F^S^E^T @D= 0;
           ^N^E^W_^N^O^D^E@B.^N^O^D^E_^V^I^S^I^T^E^D @D= FALSE;
           ^N^E^W_^N^O^D^E@B.^L^I^S^T_^C^H^A^R^A^C^T^E^R_^C^O^U^N^T @D= ^L^I^S^T_^C^O^U^N^T;
           ALLOCATE ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R @D [ 1 .. ^L^I^S^T_^C^O^U^N^T ];
           IF ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R = NIL THEN
              ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^R^O^O^M_^E^R^R^O^R;
              ^O^S^P$^S^E^T_^S^T^A^T^U^S_^A^B^N^O^R^M^A^L(^T^D^C_^P^R^O^D_^C^O^D^E,
                 ^T^D^E_^O^P^T^I^M^I^Z^E_^T^A^B^L^E_^F^U^L^L, '', ^S^T^A^T^U^S);
              ^E^R^R^O^R_^S^T^A^T^U^S(^S^T^A^T^U^S);
              RETURN
           IFEND;
           ^S^U^C^C_^N^O^D^E @D= ^C^U^R^R_^L^E^V^E^L;
           ^P^R^E^D_^N^O^D^E @D= NIL;
           ^N^E^W_^N^D^X @D= 0;
           WHILE ( ^S^U^C^C_^N^O^D^E <> NIL ) AND
                 ( ^E^R^R^O^R_^R^E^T^U^R^N = ^N^O_^E^R^R^O^R ) DO
              CASE ^S^U^C^C_^N^O^D^E@B.^O^P^C^O^D^E OF
                 = ^L^I^S^T =                ^0 ^O^L^D ^N^O^D^E, ^M^O^V^E ^P^I^E^C^E^S ^T^O ^N^E^W ^N^O^D^E ^2
                    FOR ^O^L^D_^N^D^X @D= 1 TO ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^C^H^A^R^A^C^T^E^R_^C^O^U^N^T DO
                       ^N^E^W_^N^D^X @D= ^N^E^W_^N^D^X + 1;
                       ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^N^E^W_^N^D^X].^C^H^A^R^A^C^T^E^R @D=
                          ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^O^L^D_^N^D^X].^C^H^A^R^A^C^T^E^R;
                       ^N^E^W_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^N^E^W_^N^D^X].^A^C^T^I^O^N @D=
                          ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^O^L^D_^N^D^X].^A^C^T^I^O^N
                    FOREND;
                    FREE ^S^U^C^C_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R;
                    IF ^S^U^C^C_^N^O^D^E = ^C^U^R^R_^L^E^V^E^L THEN ^0 ^O^L^D ^L^I^S^T ^I^S ^F^I^R^S^T ^O^N ^L^V^L ^2
                       ^C^U^R^R_^L^E^V^E^L @D= ^S^U^C^C_^N^O^D^E@B.^N^E^X^T_^N^O^D^E; ^0 ^L^I^N^K ^A^R^O^U^N^D ^I^T ^2
                       FREE ^S^U^C^C_^N^O^D^E;
                       ^S^U^C^C_^N^O^D^E @D= ^C^U^R^R_^L^E^V^E^L
                    ELSE
                       ^P^R^E^D_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E@B.^N^E^X^T_^N^O^D^E;
                       FREE ^S^U^C^C_^N^O^D^E;
                       ^S^U^C^C_^N^O^D^E @D= ^P^R^E^D_^N^O^D^E@B.^N^E^X^T_^N^O^D^E
                    IFEND;
                 = ^R^A^N^G^E, ^S^I^N^G^L^E_^A^C^T^I^O^N_^R^A^N^G^E =
                    ^P^R^E^D_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E;
                    ^S^U^C^C_^N^O^D^E @D= ^P^R^E^D_^N^O^D^E@B.^N^E^X^T_^N^O^D^E;
                 = ^F^A^I^L =             ^0 ^A^T ^E^N^D, ^I^N^S^E^R^T ^N^E^W ^N^O^D^E ^H^E^R^E ^2
                    ^N^E^W_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D= ^S^U^C^C_^N^O^D^E; ^0 ^N^E^W ^L^I^S^T ^A^T ^E^N^D ^2
                    IF ^S^U^C^C_^N^O^D^E = ^C^U^R^R_^L^E^V^E^L THEN ^0 ^N^E^W ^N^O^D^E ^I^S ^F^I^R^S^T ^O^N ^L^V^L ^2
                       ^C^U^R^R_^L^E^V^E^L @D= ^N^E^W_^N^O^D^E ^0 ^R^E^T^U^R^N ^P^O^I^N^T^E^R ^T^O ^M^Y ^C^A^L^L^E^R ^2
                    ELSE
                       ^P^R^E^D_^N^O^D^E@B.^N^E^X^T_^N^O^D^E @D= ^N^E^W_^N^O^D^E
                    IFEND;
                    ^S^U^C^C_^N^O^D^E @D= NIL;
              CASEND;
           WHILEND
        IFEND
     PROCEND ^C^O^M^B^I^N^E_^L^I^S^T_^L^E^V^E^L;
     ?? OLDTITLE ??

     ?? NEWTITLE @D= '^A^S^S^I^G^N_^I^N^P^U^T_^O^F^F^S^E^T^S' ??
     ?? SKIP @D= 2 ??

     PROCEDURE ^A^S^S^I^G^N_^I^N^P^U^T_^O^F^F^S^E^T^S (^I^N_^N^O^D^E@D @B^I^N^P^U^T_^N^O^D^E);
        VAR
           ^A^C^T^I^O^N_^N^D^X@D INTEGER;

        CASE ^I^N_^N^O^D^E@B.^O^P^C^O^D^E OF
           = ^F^A^I^L =
              ;
           = ^L^I^S^T =
              FOR ^A^C^T^I^O^N_^N^D^X @D= 1 TO ^I^N_^N^O^D^E@B.^L^I^S^T_^C^H^A^R^A^C^T^E^R_^C^O^U^N^T DO
                 IF ^I^N_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^A^C^T^I^O^N.^O^R^D^I^N^A^L =
                       ^N^O_^O^R^D^I^N^A^L THEN
                    ^I^N_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^A^C^T^I^O^N.^N^E^X^T_^O^F^F^S^E^T @D=
                       ^I^N_^N^O^D^E@B.^L^I^S^T_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L@B
                          .^O^F^F^S^E^T
                 IFEND
              FOREND;
           = ^R^A^N^G^E =
              FOR ^A^C^T^I^O^N_^N^D^X @D= ORD(^I^N_^N^O^D^E@B.^R^A^N^G^E_^L^O^W^E^R_^B^O^U^N^D) TO
                                ORD(^I^N_^N^O^D^E@B.^R^A^N^G^E_^U^P^P^E^R_^B^O^U^N^D) DO
                 IF ^I^N_^N^O^D^E@B.^R^A^N^G^E_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^O^R^D^I^N^A^L=^N^O_^O^R^D^I^N^A^L THEN
                    ^I^N_^N^O^D^E@B.^R^A^N^G^E_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^N^E^X^T_^O^F^F^S^E^T @D=
                       ^I^N_^N^O^D^E@B.^R^A^N^G^E_^P^O^I^N^T^E^R@B[^A^C^T^I^O^N_^N^D^X].^N^E^X^T_^L^E^V^E^L@B.^O^F^F^S^E^T
                 IFEND
              FOREND;
           = ^S^I^N^G^L^E_^A^C^T^I^O^N_^R^A^N^G^E =
              IF ^I^N_^N^O^D^E@B.^S^A^R_^A^C^T^I^O^N.^O^R^D^I^N^A^L = ^N^O_^O^R^D^I^N^A^L THEN
                 ^I^N_^N^O^D^E@B.^S^A^R_^A^C^T^I^O^N.^N^E^X^T_^O^F^F^S^E^T @D=
                    ^I^N_^N^O^D^E@B.^S^A^R_^A^C^T^I^O^N.^N^E^X^T_^L^E^V^E^L@B.^O^F^F^S^E^T
              IFEND
        CASEND
     PROCEND ^A^S^S^I^G^N_^I^N^P^U^T_^O^F^F^S^E^T^S;
     ?? OLDTITLE ??

     ?? EJECT ??

     ^E^R^R^O^R_^R^E^T^U^R^N @D= ^N^O_^E^R^R^O^R;
     ^A^P^P^S^T^R_^L^A^T^E^S^T_^N^E^W_^N^O^D^E @D= ^A^P^P^S^T^R_^T^A^B^L^E;

     ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E(^I^N^P^U^T_^L^I^S^T, NIL, @B^C^R^E^A^T^E_^R^A^N^G^E^S);
     ^C^R^E^A^T^E_^R^A^N^G^E_^L^E^V^E^L(^I^N^P^U^T_^L^I^S^T);  ^0 ^R^O^O^T ^L^E^V^E^L ^W^A^S^N'^T ^H^A^N^D^L^E^D ^R^E^C^U^R^S^I^V^E^L^Y

     IF ^E^R^R^O^R_^R^E^T^U^R^N = ^N^O_^E^R^R^O^R THEN
        ^I^N^S^E^R^T_^R^E^M^A^I^N^I^N^G_^C^H^A^R^S;       ^0 ^A^D^D^S ^A^L^L ^C^H^A^R^S ^N^O^T ^A^L^R^E^A^D^Y ^I^N ^F^I^R^S^T ^L^V^2
        IF ^E^R^R^O^R_^R^E^T^U^R^N = ^N^O_^E^R^R^O^R THEN
           ^T^R^A^V^E^R^S^E_^I^N^P^U^T_^T^R^E^E(^I^N^P^U^T_^L^I^S^T, NIL, @B^C^O^M^B^I^N^E_^L^I^S^T^S);
           ^C^O^M^B^I^N^E_^L^I^S^T_^L^E^V^E^L(^I^N^P^U^T_^L^I^S^T); ^0 ^R^O^O^T ^L^E^V^E^L ^W^A^S^N'^T ^H^A^N^D^L^E^D ^2
           IF ^E^R^R^O^R_^R^E^T^U^R^N = ^N^O_^E^R^R^O^R THEN
              ^I^N^P^U^T_^O^F^F^S^E^T @D= 0;      ^0 ^A^S^S^I^G^N ^O^B^J^E^C^T ^T^A^B^L^E ^O^F^F^S^E^T ^A^D^D^R^E^S^S^E^S ^2
              ^D^U^M^P_^I^N^P^U^T_^N^O^D^E(@B^C^A^L^C^U^L^A^T^E_^I^N^P^U^T_^O^F^F^S^E^T^S);
              ^D^U^M^P_^I^N^P^U^T_^N^O^D^E(@B^A^S^S^I^G^N_^I^N^P^U^T_^O^F^F^S^E^T^S)
           IFEND
        IFEND
     IFEND
  PROCEND ^O^P^T^I^M^I^Z^E_^T^A^B^L^E^S;
  ?? OLDTITLE ??

MODEND ^T^D^U^T^A^B;