home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / numbr11.zip / sample.cmd < prev   
OS/2 REXX Batch file  |  1996-05-19  |  799b  |  28 lines

  1. /* program REXX that shows how to use the function NUMBER */
  2.  
  3. /* Register the function, if necessary */
  4. /* The file NUMBERS.DLL must be in a directory listed in DPATH */
  5. /* otherwise you must include the full drive and directory in the second */
  6. /* parameter of RxFuncAdd */
  7.  
  8. if (RxFuncQuery("Number") == 1) then call RxFuncAdd "Number", "Numbers", "Number"
  9.  
  10. /* get the number, the gender and the language */
  11. /* number to convert */
  12. Say 'Enter the number'
  13. Pull Number
  14.  
  15. /* gender */
  16. Say 'Enter the gender (m = masculine, f = feminine)'
  17. Pull Gender
  18.  
  19. /* language */
  20. Say 'Enter the language (a = English, e = Spanish, c = Catalan)'
  21. Pull Language
  22.  
  23. /* call the function using these parameters */
  24. OneNumber = Number(Number, Gender, Language)
  25.  
  26. /* show the result */
  27. say OneNumber
  28.