home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / m / m071 / 1.img / PAS / SAMPLEP.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1993-04-20  |  1.1 KB  |  27 lines

  1. {======================================================================}
  2. {     Sample program in Pascal language to show files in CAP format.   }
  3. {     By: Jeng Shun Huo (Fire) & Kuo Shiang Shiang (Djohan)            }
  4. {                                                                      }
  5. {     Compiler     :  Turbo Pascal V5.5 or later                       }
  6. {     Unit used    :  CAP.TPU                                          }
  7. {======================================================================}
  8.  
  9. uses Cap60, Crt;
  10.  
  11. var error_code : integer;
  12.  
  13. begin
  14.   Show_CAP('SAMPLE.CAP', error_code);               { Show 'SAMPLE.CAP' }
  15.   case error_code of
  16.   0 : begin
  17.         repeat until keypressed;          { If no error, wait for a key }
  18.         Set_Screen_Mode(3)             { Switch back to color text mode }
  19.       end;
  20.   1 : writeln('ERROR: The image file is not in CAP format!', chr(7));
  21.   2 : writeln('ERROR: File I/O error or file not found!', chr(7));
  22.   3 : writeln('ERROR: Invalid video card for this file!', chr(7));
  23.   4 : writeln('ERROR: This file can''t be shown in Chinese system!', chr(7))
  24.   end
  25. end.
  26.  
  27.