home *** CD-ROM | disk | FTP | other *** search
/ rtsi.com / 2014.01.www.rtsi.com.tar / www.rtsi.com / OS9 / OSK / EFFO / pd6.lzh / TST / enumerates.tst < prev    next >
Text File  |  1989-12-21  |  539b  |  34 lines

  1. .( Loading Enumerates test...) cr
  2.  
  3. #include enumerates.f83
  4.  
  5. enumerates
  6.  
  7. .( 1: Define a set of small numbers as enumerates and check their values) cr
  8.  
  9. enum.type SMALL.NUMBERS
  10.   enum ZERO
  11.   enum ONE
  12.   enum TWO
  13.   enum THREE
  14.   enum FOUR
  15.   enum FIVE
  16. enum.end
  17.   
  18. ZERO . ONE . TWO . THREE . FOUR . FIVE . cr
  19.  
  20.  
  21. .( 2: Define a set of operation code and give the values for each enumerate) cr
  22.  
  23. enum.type OP.CODES
  24.   10 >enum LOAD
  25.   15 >enum STORE
  26.   17 >enum ADD
  27.   21 >enum SUB
  28.   22 >enum MUL
  29. enum.end
  30.  
  31. LOAD . STORE . ADD . SUB . MUL . cr
  32.  
  33. forth only
  34.