; MODIFY ;--------------------------------------------------------------- ;! modifies the text of a line of a procedure and recompiles ;# Pseudoverb POPS ;----------------------------------------------------------------------- ;; Copyright (C) 1995 ;; Associated Universities, Inc. Washington DC, USA. ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2 of ;; the License, or (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public ;; License along with this program; if not, write to the Free ;; Software Foundation, Inc., 675 Massachusetts Ave, Cambridge, ;; MA 02139, USA. ;; ;; Correspondence concerning AIPS should be addressed as follows: ;; Internet email: aipsmail@nrao.edu. ;; Postal address: AIPS Project Office ;; National Radio Astronomy Observatory ;; 520 Edgemont Road ;; Charlottesville, VA 22903-2475 USA ;----------------------------------------------------------------------- ;--------------------------------------------------------------- MODIFY LLLLLLLLLLLLUUUUUUUUUUUU CCCCCCCCCCCCCCCCCCCCCCCCCCCCC MODIFY: Pseudoverb to edit characters in a line of a proc No adverbs: grammar is MODIFY and codes are space : keep old character $ : delete old character @ : replace with blank _ : (underscore) start or end insertion other : replace old character with typed one ---------------------------------------------------------------- MODIFY Type: Pseudoverb (ONLY command in a line) Use: Allows user to modify characters within a line of an AIPS procedure to correct the line or change its meaning. The grammar is: MODIFY where is the procedure name and is the line number in the procedure as shown by LIST. MODIFY first shows the existing line prefixed by ? Then it prompts for input with a ? To keep the character of the original line immediately above the cursor, type a blank (space-bar). To delete it, type a $ (dollar-sign). To replace it, type the new character (to get a new blank character type an @ sign). To insert text prior to the character immediately above the cursor, type an _ then the desired text followed by an _. You may continue to MODIFY the rest of the line, but remember that the current character position in the old line is now to the left of the current cursor position by the number of inserted characters (plus the 2 _'s). MODIFY displays the edited line after you hit a carriage return, and does not change the line number. The EXPLAIN file for MODIFY gives an example of its use. ---------------------------------------------------------------- MODIFY: Pseudoverb to edit lines in AIPS procedures DOCUMENTOR: Alan Bridle (NRAO-Charlottesville) RELATED PROGRAMS: PROC, LIST PURPOSE MODIFY provides a rudimentary editor for lines in AIPS procedures. The writing and editing of long (>10 lines) procedures using the AIPS editor will be appreciated by users who also enjoy eating cold toads for breakfast on the grounds that everything else in the day will be an improvement. Long procedures are best edited in text files at monitor level in the computer, where there are good editing facilities. Such files may then be transferred to AIPS using the RUN file facility. COMMENTS Here is an example of the use of MODIFY: To modify line 2 in an AIPS procedure called ED: >MODIFY ED 2 The computer replies with: ?TYPE 'THIS IS EDS PROC' ? You now type: MY@_NEW_ @FOR@EXAMPLE' so that the terminal reads: ?TYPE 'THIS IS EDS PROC' ? MY@_NEW_ @FOR@EXAMPLE' followed by a carriage return, and the computer replies: TYPE 'THIS IS MY NEW PROC FOR EXAMPLE' showing you the edited line. As a second example, type: >MODIFY ED 2 The computer replies with: ?TYPE 'THIS IS MY NEW PROC FOR EXAMPLE' ? You type: $$$$ _EDURE,_ so that the terminal reads: ?TYPE 'THIS IS MY NEW PROC FOR EXAMPLE' ? $$$$ _EDURE,_ followed by a carriage return, and the computer replies: TYPE 'THIS IS MY PROCEDURE, FOR EXAMPLE' Enjoy your toad.