home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / vmsnet / tpu / 545 next >
Encoding:
Internet Message Format  |  1992-12-21  |  2.2 KB

  1. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!spool.mu.edu!umn.edu!The-Star.honeywell.com!news.dasd.honeywell.com!madre.dasd.honeywell.com!tas
  2. Newsgroups: vmsnet.tpu
  3. Subject: Re: Help on "simple" EVE/TPU procedure
  4. Message-ID: <1992Dec21.105158.1@madre.dasd.honeywell.com>
  5. From: tas@madre.dasd.honeywell.com (Todd A Sorensen)
  6. Date: 21 Dec 92 10:51:58 MST
  7. References: <BzKtA4.D67@news.cso.uiuc.edu>
  8. Organization: Honeywell Flight Management Systems
  9. Nntp-Posting-Host: madre
  10. Nntp-Posting-User: tas
  11. Lines: 47
  12.  
  13. In article <BzKtA4.D67@news.cso.uiuc.edu>, ritley@uimrl7.mrl.uiuc.edu () writes:
  14. > I am trying to clean up large amounts of Fortran code which
  15. > contains "junk" in each record of each file, beyond the
  16. > 72-nd character position in each record.
  17. -- 
  18.  
  19. Here is a simple procedure to do that, but I might use a learn sequence if I
  20. knew what the file looked like, since that is usually faster than writing a TPU
  21. procedure and debugging it, and then running it on the file.
  22.  
  23. For the most part, I use LSE since I do embedded stuff, but I think you can
  24. compile this with "extend this" and save your section file.  The procedure can
  25. be invoked with "tpu d72".  The way I determine end of buffer might be
  26. cumbersome, so I am open to suggestions from the "pros".
  27.  
  28.  
  29. -----cut here---------------------------------------------------------------
  30. procedure d72
  31.  
  32. !  Mark end of buffer
  33.  
  34.   position(buffer_end);
  35.   eob := mark(none);
  36.   position(buffer_begin);
  37.  
  38.   loop          
  39.     position(line_begin);
  40.     eob1 := mark(none);     ! mark current position
  41.     exitif (eob1=eob);      ! exit if end of buffer
  42.     col72 := cursor_horizontal(72);   ! move to col 72
  43.     erase_character(length(current_line) - 72);  ! erase to eol
  44.     move_vertical(1);
  45.   endloop
  46.  
  47. endprocedure;
  48.  
  49. -----cut here---------------------------------------------------------------
  50.  
  51. -------------------------------------------------------------------------------
  52. Todd A Sorensen               Honeywell Defense Avionics Systems Division
  53. (505) 828-5611                internet: tas@dasd.honeywell.com
  54.                               fax: (505) 828-5500
  55. ------------------------------------------------------------------------------- 
  56. Why celebrate CHRISTmas if you don't believe in Him?
  57.