home *** CD-ROM | disk | FTP | other *** search
/ AMIGA PD 1 / AMIGA-PD-1.iso / Programme_zum_Heft / Programmieren / Workshops / E-Compiler / Rexx / Ecompile.ced next >
Text File  |  1992-09-03  |  807b  |  38 lines

  1. /* Ecompile.rexx: run E compiler from ced.
  2.    thanks to Rick Younie for improvements. */
  3.  
  4. epath = 'run:'                    /* homedir of EC */
  5.  
  6. OPTIONS RESULTS
  7. ADDRESS COMMAND
  8.  
  9. IF ~EXISTS('ram:ec') THEN 'copy 'epath'ec ram:'    /* for slow sys: devices */
  10.  
  11. ADDRESS 'rexx_ced'
  12.  
  13. 'status 19'                    /* ask ced filename */
  14. file = result
  15.  
  16. 'status 18'
  17. IF result ~= 0 THEN DO                /* save if changed */
  18.   'save' file
  19.   SAY 'saving changes..'
  20. END
  21. ELSE SAY 'no changes..'
  22.  
  23. PARSE VAR file comparg '.e'            /* strip the extension */
  24. SAY 'invoking E compiler with file' comparg'.e'
  25.  
  26. ADDRESS
  27. OPTIONS FAILAT 1000000
  28. 'ram:ec -E' comparg                /* run compiler */
  29. ebyte = rc
  30.  
  31. IF EXISTS(comparg) THEN comparg            /* run exe */
  32.  
  33. ADDRESS
  34. pull                        /* wait for a <cr> */
  35. 'cedtofront'
  36. IF ebyte>0 THEN 'jump to byte' ebyte        /* jump to spot of error */
  37. exit 0
  38.