home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / insidetp / 1990_03 / cadtests.pas next >
Pascal/Delphi Source File  |  1990-02-22  |  949b  |  48 lines

  1. PROGRAM CADTests;
  2.  
  3. USES
  4.    Crt,Dos,CADThief;
  5.  
  6. {This program tests the CAD handler routine}
  7.  
  8.  VAR
  9.      A: char;
  10.  
  11.  BEGIN
  12.    ClrScr;
  13.  
  14.    {Test 1 to go in any program section}
  15.  
  16.    A := ' ';
  17.    GotoXY(1,20);
  18.    WriteLn('This section puts the program');
  19.    WriteLn('into an endless loop to simulate');
  20.    WriteLn('the checking you can perform in');
  21.    WriteLn('a program during processing.');
  22.    WHILE A = ' ' DO
  23.      BEGIN
  24.        IF GetCAD and HandleCADs THEN
  25.          BEGIN
  26.            ClrScr;
  27.        A := 'X'
  28.      END
  29.      END;
  30.  
  31.    {Test 2 which is designed for an input loop}
  32.  
  33.    GotoXY(1,3);
  34.    WriteLn('-------- Starting Test -------');
  35.    WriteLn('Type anything to test keyboard');
  36.    Write  ('           Press Enter to quit: ');
  37.    WHILE Ord(A) <> 13 DO
  38.      BEGIN
  39.        IF KeyPressed THEN
  40.      BEGIN
  41.        A := ReadKey;
  42.        Write(A)
  43.      END
  44.        ELSE
  45.      IF GetCAD and HandleCADs THEN A:=Chr(13)
  46.      END
  47.  END.
  48.