


									-1-






     RESEQ.BAS Line Number Reseqencer for BASIC-PLUS programs


     RESEQ  will  resequence  all  or  any  part  of  a  BASIC-PLUS  program in
either  EXTEND  or  NO EXTEND  mode  containing 3200 or less statement numbers.

     Upon issuing the RUN command, RESEQ will respond with the prompt

     _#

     to  which  the  user  responds with a filename.  If no extension is given,
.BAS is used.  For example,

     _#DK3:FILNAM <40>

     would  cause  the  program  FILNAM.BAS on DK3: to be resequenced and given
a  <40> protection code upon RESEQ completion.  Note: specifying /H(ELP) as the
file name will cause RESEQ to print this user aid file.

     After the filename is entered RESEQ gives the prompt

     _*

     to which the user responds with a command in the form of 'A-B=C+D',  where

     A=old start number
     B=old finish number
     C=new start number
     D=increment

     If any numbers are left out,  RESEQ will use the following default values:

     A--     1
     B-- 32767
     C--    10
     D--    10

     For example, the command

     _*20+20

     will  cause  RESEQ to resequence the file from line #1 through line #32767
with  the  new  initial  statement  number  being  20 and all other lines being
increments  of  20.   Negative increments are allowed under RESEQ provided that
'-',  '=',  and '+' are explicitly designated before the minus sign (i.e. as in
the command string '10-1000=500+-5').



									-2-






     RESEQ  also  features  a  second  resequencing format, 'A-B*D', for use in
multiplying  the  old  line number values.  In this operation, D represents the
multiplying factor, with the same default values for A and B as in the standard
resequencing format. Likewise, variations of this format are permisible.

     Two examples of this command are

     _*10-100*5

     which would multiply the lines 10 thru 100 by 5, and

     _**2

     which would multiply all line numbers in the program by 2.

     Note:  use  the  multiplying  factor  with  caution since there is no cor-
responding  divide  factor.   Any attempt to multiply a line number by a factor
high  enough  to  cause  that  line  number to exceed 32767 will cause an error
message to be printed and the "*" prompt reissued.

     There  is  no  check  to see if two lines obtain the same line number, nor
if the new file is in sequential order.  If the program to resequence is not in
order  to  start  RESEQ,  however,  an error message will be issued and program
execution halted.

     If  a  line number is not found while the target file is being resequenced
an  error  message  will  be  issued  and a '?' placed after the line number in
question.  If  a  target line number contains an imbedded blank, the blank will
removed from the statement.

     All  occurences  of  GOTO,  GOSUB, IF THEN ELSE, RESUME, ERL, LINE, and ON
... GOTO/GOSUB in the file will be resequenced.

     RESEQ  will  execute  two passes over the input file, then reissue the "#"
prompt.  To stop program execution, type ^C.

     Note that RESEQ may also be run by typing the command

     RES(EQUENCE) FILNAM

     after  a  "Ready"  message,  with  FILNAM  being the designated program to
resequence  (i.e.  RESEQ DK1:HMWK01<40>, RESEQ STDEV, etc.).  RESEQ  will  then
issue  the  "*"  prompt  requesting the resequence format, resequence the file,
and end without reissuing the "#" prompt.

     End of RESEQ.TXT
