Program ConfArr5;


Var
  O: array [ 1..4 ] of Boolean = ( false, true, true, false );
  K: packed array [ 1..4 ] of Boolean;

Procedure Foo ( x: array [ i..j: Integer ] of Boolean;
                Var y: packed array [ k..l: Integer ] of Boolean );

begin (* Foo *)
  Pack ( x, k, y );
end (* Foo *);


Procedure Bar ( x: packed array [ i..j: Integer ] of Boolean;
                Var y: array [ k..l: Integer ] of Boolean );

begin (* Bar *)
  Unpack ( x, y, k );
end (* Bar *);


begin
  Foo ( O, K );
  if not K [ 1 ] and K [ 2 ] and K [ 3 ] and not K [ 4 ] then
    begin
      Bar ( K, O );
      if not O [ 1 ] and O [ 2 ] and O [ 3 ] and not O [ 4 ] then
        writeln ( 'OK' )
      else
        writeln ( 'failed (Bar)' );
    end (* if *)
  else
    writeln ( 'failed (Foo)' );
end.
