home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a063 / 6.img / SAMPLE / APTSQL / CLCST_1.FPL < prev    next >
Encoding:
Text File  |  1990-08-24  |  650 b   |  31 lines

  1. create apt proc clcst_1(     entry     quantity int,
  2.                                 entry     discount float,
  3.                                 entry     price    money,
  4.                                 entry     total    money,
  5.                                 variable  status   int  ) as
  6. begin
  7.     if quantity is NULL
  8.     begin
  9.         print "Please enter the quantity."
  10.         status = 0
  11.         return
  12.     end
  13.         
  14.     if price is NULL
  15.     begin
  16.         print "The price is not in the database."
  17.         status = 0
  18.         return
  19.     end
  20.  
  21.     if discount is NULL
  22.     begin
  23.         discount = 0
  24.     end
  25.  
  26.     total = (1.00 - (discount/100.00) ) * (quantity * price)
  27.     status = 1
  28.         
  29.     return
  30. end
  31.