home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / C / SASC6571.LZX / rexx / unindent.se < prev    next >
Encoding:
Text File  |  1996-12-24  |  454 b   |  30 lines

  1. /* rexx to indent a marked block */
  2. /* Get line of end of block */
  3. 'BM "E"'
  4. options results
  5. 'GL'
  6. end = result
  7. options
  8. /* goto start of block */
  9. 'BM "B"'
  10. 'BL'
  11. do forever
  12. /* Get line */
  13. options results
  14. 'GT'
  15. options
  16. line = result
  17. /* get first char */
  18. num = SUBSTR(line, 1, 3)
  19. if num = "   " then 
  20.    'DC DC DC'
  21. else if SUBSTR(line, 1, 1) = "09"x then 
  22.    'DC'
  23. 'BL NL'
  24. /* check to see if done */
  25. options results
  26. 'GL'
  27. options
  28. if result > end then exit(0)
  29. end
  30.