home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / I265.ZIP / ordinal.cmd < prev    next >
OS/2 REXX Batch file  |  1992-08-05  |  182b  |  14 lines

  1. /* */
  2. x = 2
  3. say ordinal(x)
  4. say ordinal(10)
  5. return
  6.  
  7. ordinal:
  8.      ord.  = 'th'
  9.      ord.1 = 'st'
  10.      ord.2 = 'nd'
  11.      ord.3 = 'rd'
  12.      arg num .
  13. return num || ord.num
  14.