info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Anybody any idea on how to set back a revision number?


From: Lee Sau Dan
Subject: Re: Anybody any idea on how to set back a revision number?
Date: 31 Oct 2001 08:46:47 +0100
User-agent: Gnus/5.090003 (Oort Gnus v0.03) Emacs/20.7

>>>>> "Philip" == Philip Lijnzaad <address@hidden> writes:

    Philip> Oops, wrong. You also have to change pretty much all the
    Philip> lines that contain just the revision number ('3.x' in your
    Philip> case) to 2.x, and you also have to change all the lines
    Philip> that look like ``next 3.x;'' to ``next 2.x;''.

    Philip> In all likelihood, it is not worth the trouble, so the
    Philip> short answer to your question is still: don't do it, it's
    Philip> mostly pointless. Cheers,

I remember that back in the old  days of BASIC of Apple ][ (i.e. BASIC
with  the  line  numbers),  there  were utilities  called  "renum"  or
"renumber".  I think GWBASIC  has it, too.  These "renumber" utilities
can renumber the lines of the programs, modifying the cross references
(GOTO, GOSUB) as well.

Maybe,  somebody  would like  to  use  his free  time  to  hack out  a
Perl/shell script  to renumber CVS/RCS numbers.  The  most tricky part
would  be  cross-references,  either  from  within a  single  ,v  file
(e.g. RCS control info, $Id$ lines), or from other files (e.g. tags).



Background: BASIC programs in the  old days have mandatory line number
in front of each statement (more precisely line).  I was told this was
to prevent  chaos and the  necessity to sort  a pile of  _punch cards_
after dropping them onto the floor.  Anyway, these numbers also served
as  labels for  the branch  instructions  -- GOTO  and GOSUB.   People
usually do not assign line numbers consecutively.  They like to assign
it in multiples of  10.  So, "10", "20", ...  This is  to make room to
insert lines  into the  middle of an  existing program,  using numbers
like "15", "25".   The computer will always interpret  a BASIC program
in the  order of  line numbers.  But  then, after some  maintenance, a
BASIC program  would be full of  line numbers that end  with "5", "2",
"3", etc.  and  it may become difficult to find more  room in the line
number space  to insert new lines.   Having such lines  also makes the
program look  not neat.  So, people invented  the "renumber" utilities
to "prettify" the line numbers.




-- 
Lee Sau Dan                     李守敦(Big5)                    address@hidden(HZ) 
.----------------------------------------------------------------------------.
| e-mail: address@hidden    http://www.csis.hku.hk/~sdlee |
`----------------------------------------------------------------------------'


reply via email to

[Prev in Thread] Current Thread [Next in Thread]