Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for Renumbering Utility for QBASIC :)

Status
Not open for further replies.

wraygun

Programmer
Dec 9, 2001
272
US
Hi there,

I'm looking for a good renumbering utility for qbasic. Any help would be appreciated or if any of you aspiring programmers want a challenge, here's your chance.

Thanks in advance,
 
I think u should first explain what do u mean by a renumbering utility then someone can help u. Also be specific and clear or else ur post tends to be over looked!
 
To be more specific, I'm looking for a program or utility that will convert the line numbers in my qbasic programs into even increments. For example the utility would convert example 'a' to example 'b':

example 'a'

1 x = x + 1
4 for t = t to 5
10 print x;t
12 next t
13 goto 1


example 'b'

10 x = x + 1
20 for t = t to 5
30 print x;t
40 next t
50 goto 10

Thanks again,
Wraygun

 
I suppose you could save program in ascii format, and if you have an old version of basic (basica or gwbasic) use it's renum function to renumber your lines. It just seems to be a step backwards in evolution to use the line numbers when none is needed (with the exception of the odd line label). David Paulson

 
Hi,
This is your program without line numbers.

REM start code
begin:
x = x + 1
for t = t to 5
print x;t
next t
goto begin
REM end code

Using a label instead of a line number makes the code more readable(if your labels
mean something).

Hope this helps.



Pappy
You learn something everyday.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top