home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PASCAL / TPDB21.ZIP / MATHDEMO.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-02-22  |  812 b   |  37 lines

  1. {$A+,B+,D-,E-,F-,I-,L-,N-,O-,R-,S-,V-}
  2. {$M 65520,0,655360}
  3. Program MathDemo;
  4.  
  5. Uses CRT,TPDB,TPDBINDX,TPDBDate,TPDBMath;
  6.  
  7. {Field  Field Name  Type       Width    Dec
  8.       1  NUMBER1     Numeric        8      2
  9.       2  NUMBER2     Numeric        8      2
  10.       3  ADD         Numeric        8      2
  11.       4  SUB         Numeric        8      2
  12.       5  MUL         Numeric        8      2
  13.       6  DIV         Numeric        8      2
  14.  ** Total **                      49}
  15.  
  16.  
  17.  begin
  18.     DBOpenFile('mathdemo.dbf');
  19.     Zap;
  20.     NewDBRec;
  21.     Repl(1,'101.22');
  22.     {Try inserting different
  23.      values in these two lines.}
  24.     Repl(2,'502.45');
  25.     AddDBRec;
  26.     GetDBRec(1);
  27.     Repl(3,Add(1,2));
  28.     Repl(4,Sub(2,1));
  29.     Repl(5,Mul(1,2));
  30.     Repl(6,Divide(2,1));
  31.     PutDBRec(1);
  32.     GetDBRec(1);
  33.     ClrScr;
  34.     Display;
  35.     CloseDBFile;
  36.  end.
  37.