{$R-,V-,C+,U+,B+ }
Program PibPict;

(* ------------------------------------------------------------------------ *)
(*                                                                          *)
(*        Program: PibPict                                                  *)
(*                                                                          *)
(*        Purpose: Demonstrates the editing facilities of routine           *)
(*                 PICTURE_FORMAT.                                          *)
(*                                                                          *)
(*        Needs:   Data file PIBPICT.DAT and include file PICTFORM.PAS.     *)
(*                                                                          *)
(*        Output:  The test output is written to file PIBPICT.LIS.          *)
(*                                                                          *)
(*        Author:  Philip R. Burns                                          *)
(*        Date:    February, 1985.                                          *)
(*                                                                          *)
(*        Notice:  You are free to use this routine in code you write.      *)
(*                 If you do, please give proper credit.                    *)
(*                                                                          *)
(*        Bugs:    Report bugs and/or enhancements to me on one of the      *)
(*                 following two Chicago area BBSs:                         *)
(*                                                                          *)
(*                 Gene Plantz's IBBS      (312) 882 4227                   *)
(*                 Ron Fox's RBBS          (312) 940 6496                   *)
(*                                                                          *)
(* ------------------------------------------------------------------------ *)

                                   (* MUST BE DECLARED AS GLOBAL TYPE! *)
Type
   AnyStr = String[255];

Var
   Picture:  AnyStr;
   Res:      AnyStr;
   X:        Real;
   F:        Text;
   G:        Text;
   Ierr:     Integer;

(*$IPICTFORM.PAS*)

Begin (* PibPict *);

   Assign( F , 'PIBPICT.DAT' );
   Reset( F );

   Assign( G , 'PIBPICT.LIS' );
   Rewrite( G );

   Writeln('Beginning Test ... ');

   Repeat

      Readln( F , X );
      Writeln( G , 'Number is  ', X:16:5 );

      Readln( F , Picture );
      Writeln( G , 'Picture is ', Picture );

      Picture_Format( X, Picture, Res, Ierr );
      Writeln( G , 'Result is  ', Res, '     Ierr = ', Ierr );
      Writeln( G , '--------------------------------------------------');

   Until( Eof( F ) );

   Writeln('Test Finished.');
   Writeln('Test output on file PIBPICT.LIS.');

   Close( F );
   Close( G );

END  (* PibPict *).

,
f 9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9G9