home *** CD-ROM | disk | FTP | other *** search
/ Hall of Fame / HallofFameCDROM.cdr / prpascal / pibpict.lzh / PIBPICT.PAS < prev    next >
Pascal/Delphi Source File  |  1986-01-16  |  3KB  |  75 lines

  1. {$R-,V-,C+,U+,B+ }
  2. Program PibPict;
  3.  
  4. (* ------------------------------------------------------------------------ *)
  5. (*                                                                          *)
  6. (*        Program: PibPict                                                  *)
  7. (*                                                                          *)
  8. (*        Purpose: Demonstrates the editing facilities of routine           *)
  9. (*                 PICTURE_FORMAT.                                          *)
  10. (*                                                                          *)
  11. (*        Needs:   Data file PIBPICT.DAT and include file PICTFORM.PAS.     *)
  12. (*                                                                          *)
  13. (*        Output:  The test output is written to file PIBPICT.LIS.          *)
  14. (*                                                                          *)
  15. (*        Author:  Philip R. Burns                                          *)
  16. (*        Date:    February, 1985.                                          *)
  17. (*                                                                          *)
  18. (*        Notice:  You are free to use this routine in code you write.      *)
  19. (*                 If you do, please give proper credit.                    *)
  20. (*                                                                          *)
  21. (*        Bugs:    Report bugs and/or enhancements to me on one of the      *)
  22. (*                 following two Chicago area BBSs:                         *)
  23. (*                                                                          *)
  24. (*                 Gene Plantz's IBBS      (312) 882 4227                   *)
  25. (*                 Ron Fox's RBBS          (312) 940 6496                   *)
  26. (*                                                                          *)
  27. (* ------------------------------------------------------------------------ *)
  28.  
  29.                                    (* MUST BE DECLARED AS GLOBAL TYPE! *)
  30. Type
  31.    AnyStr = String[255];
  32.  
  33. Var
  34.    Picture:  AnyStr;
  35.    Res:      AnyStr;
  36.    X:        Real;
  37.    F:        Text;
  38.    G:        Text;
  39.    Ierr:     Integer;
  40.  
  41. (*$IPICTFORM.PAS*)
  42.  
  43. Begin (* PibPict *);
  44.  
  45.    Assign( F , 'PIBPICT.DAT' );
  46.    Reset( F );
  47.  
  48.    Assign( G , 'PIBPICT.LIS' );
  49.    Rewrite( G );
  50.  
  51.    Writeln('Beginning Test ... ');
  52.  
  53.    Repeat
  54.  
  55.       Readln( F , X );
  56.       Writeln( G , 'Number is  ', X:16:5 );
  57.  
  58.       Readln( F , Picture );
  59.       Writeln( G , 'Picture is ', Picture );
  60.  
  61.       Picture_Format( X, Picture, Res, Ierr );
  62.       Writeln( G , 'Result is  ', Res, '     Ierr = ', Ierr );
  63.       Writeln( G , '--------------------------------------------------');
  64.  
  65.    Until( Eof( F ) );
  66.  
  67.    Writeln('Test Finished.');
  68.    Writeln('Test output on file PIBPICT.LIS.');
  69.  
  70.    Close( F );
  71.    Close( G );
  72.  
  73. END  (* PibPict *).
  74.  
  75.