home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / bazy / carcosts / rexx / test3.rexx < prev    next >
OS/2 REXX Batch file  |  1996-11-02  |  653b  |  40 lines

  1. /* Test Carcost's ARexx-Port */
  2.  
  3. /* Basename is ALWAYS >CARCOSTS.x<, even if you call the programm */
  4. /* >AUTOKOSTEN<...                                              */
  5. address "CARCOSTS.1"
  6.  
  7. options results
  8.  
  9. /* Example how to get some statistics */
  10.  
  11. getfuelnumber
  12. max = result - 1
  13. say "Number of entries " max+1
  14.  
  15. getsummary STARTDATE
  16. date0 = result
  17. say "Database starts at " date0
  18.  
  19. getfuelinfo date max
  20. date1 = result
  21. say "Database starts at " date1
  22.  
  23. datetoint date0
  24. day0 = result
  25.  
  26. datetoint date1
  27. day1 = result
  28. days = day1 - day0 + 1
  29.  
  30. say "These are " days "days"
  31.  
  32.  
  33. getsummary KM
  34. dkm = result
  35.  
  36. say "The distance is " dkm ", or " dkm/days " per day"
  37.  
  38.  
  39.  
  40.