home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxerror.zip / example.cmd next >
OS/2 REXX Batch file  |  1999-09-01  |  551b  |  29 lines

  1. /* Example of using RxError() function */
  2. call RxFuncAdd 'RxError','RxError','RxError'
  3.  
  4. /*  Disable hard errors:
  5.  
  6.     'disableharderrors'
  7.     'disableharderr'
  8.     'disablehard'
  9.     'dhard'
  10.     'dh'
  11. */
  12.  
  13. call RxError 'dh'
  14.  
  15. /*  
  16.     Attempt to change to the root directory of an invalid drive.
  17.     If Z: is valid, substitute a letter that isn't, which may
  18.     also be a CD drive that's empty or has a music CD in it.
  19. */
  20.  
  21. check=directory('Z:\')
  22.  
  23. if check='' then do
  24.     say ''
  25.     say 'Drive not ready.'
  26. end
  27.  
  28. call RxError 'eh'
  29.