home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #6 / amigamamagazinepolishissue1998.iso / coders / proasm / rexx / ced / preverror.ced < prev    next >
Text File  |  1996-04-29  |  2KB  |  51 lines

  1. /*****************************************************************************
  2. *                                                                            *
  3. * ARexx script:              PrevError.ced       for the ProAsm Assembler    *
  4. *                                                                            *
  5. * This script uses the ASX interface to determine the previous error and     *
  6. * jump to this line.                                                         *
  7. *                                                                            *
  8. * by Daniel Weber                                                            *
  9. * 26.May.93                                                                  *
  10. *                                                                            *
  11. *****************************************************************************/
  12.  
  13. OPTIONS RESULTS
  14.  
  15. ADDRESS 'rexx_ced'
  16. status 19
  17. name = result                /* complete path and filename   */
  18.  
  19. ADDRESS 'asx_rexx'
  20. FindID 'CygnusEd:'name
  21. port = result
  22.  
  23. IF port ~='' THEN DO
  24.   ADDRESS (''||port)            /* ARexx wierdness              */
  25.   PrevError
  26.   errortxt = result
  27.   ADDRESS 'rexx_ced'
  28.   IF errortxt ='' THEN DO
  29.     Okay1 'no more errors'
  30.     exit(0)
  31.     END
  32.  
  33.   PARSE VALUE errortxt WITH 1 LineNumber ' : ' ErrorMsg ' in file ' filename
  34.   IF filename ~='' THEN DO
  35.     status 66
  36.     DO numwins= result-1 TO 1 BY -1 UNTIL UPPER(result) = UPPER(filename)
  37.       next view
  38.       status 21
  39.     END
  40.     IF UPPER(result) ~= UPPER(filename) THEN DO
  41.     split view
  42.     open filename
  43.     END
  44.   END
  45.  
  46.   Jump To Line LineNumber
  47.   Okay1 ErrorMsg
  48.   END
  49.  
  50. EXIT(0)
  51.