home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 1627 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: inferno.mpx.com.au!jolt!nring
  2. From: nring@jolt.mpx.com.au (Nick Ring)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: How to get right SIGL with 'rx script' ?
  5. Date: 21 Jan 1996 19:15:50 GMT
  6. Organization: Microplex Pty Ltd
  7. Message-ID: <4du3d6$8mu@inferno.mpx.com.au>
  8. References: <68771172@0humpty.tomate.tng.oche.de>
  9. NNTP-Posting-Host: jolt.mpx.com.au
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. Andreas Mixich (humpty@TOMATE.TNG.OCHE.DE) wrote:
  13.  
  14. :     Hi,
  15.  
  16. : I use to have a hotkey in my texteditor which runs the current arexx-script
  17. : I am editing. The docname will be queried from the ed, the script saved
  18. : with a temp_name in t: and execute from there. This is an Arexx macro
  19. : itself. It works fine. Now I was trying to do this:
  20.  
  21. : on error,failure,syntax etc:
  22. : goto line SIGL
  23.  
  24. : This way I could be brought to the line where the error occured, similare
  25. : to integrated compilers.
  26.  
  27. With ARexx, you use 
  28.  
  29. Signal on <condition>
  30.  
  31. Where <condition> can be : BREAK_C, BREAK_D, BREAK_E, BREAK_F, ERROR, 
  32. HALT, IOERR, NOVALUE, or SYNTAX.
  33.  
  34. And somewhere in your script, you define the error conditions with 
  35.  
  36. <condition>:
  37.  
  38. ie
  39.  
  40. ERROR:
  41. ...
  42. <code to handle ERROR>
  43. ...
  44.  
  45. for more info, get the ARexxGuide from AmiNet.
  46.  
  47. : Well, the problem is, that I start the temp file using
  48. : ADDRESS COMMAND 'rx t:temp_file'. I may get a
  49.  
  50. : +++error 5 in line 456: Unmatched quote.
  51.  
  52. : but the command returns to the Arexx macro it was executed from with a
  53. : different SIGL (of course), something like
  54.  
  55. : error in line 27, label not found.
  56.  
  57. : Line 27 is ADDRESS COMMAND 'rx t:temp_file'
  58.  
  59. : Have you any ideas how to parse the first error line  ?
  60.  
  61. I hope this helps
  62.  
  63. nick
  64.