home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 626a.lha / TKEd_v1.00 / Rexx / makenumber.tked
Text File  |  1992-02-13  |  625b  |  36 lines

  1. /* ARexx program number all the line of a text */
  2.  
  3.  
  4. options results
  5.  
  6. address 'TKEd.1'        /* Name of TKEd's port */
  7.  
  8. SIGNAL ON BREAK_C
  9. 'LastLine'            /* Get number of the last line in a text */
  10. x=result
  11.  
  12. 'BeginOfFile'         /* Go to the top of the text */
  13.  
  14. 'GetLineNumber'           /* Get linenumber */
  15. y=result
  16.  
  17. do while y < x
  18.   'BeginOfLine'
  19.  
  20.   'WriteString' y     /* Write number */
  21.   'WriteString :'  /* Write ': '   */
  22.  
  23.   'Cursor' "down"
  24.  
  25.   'GetLineNumber'         /* Get linenumber */
  26.   y=result
  27.  
  28. end
  29.  
  30. 'BeginOfLine'
  31.  
  32. 'WriteString' y     /* Write number */
  33. 'WriteString ": "'  /* Write ': '   */
  34.  
  35. BREAK_C:
  36.