line numbers

When I try to write code with line numbers most often I get a warning when trying to run the program. The warning is "line numbers are too close together. start over and allow 9 spaces between line numbers" or words to that effect. What now?


line numbers and the v6 editor

Has anyone who has the v6 editor tried NOT using that editor? I.e., write the code in a text editor and then run them by using the TB System.exe? Will your programs run then?

I can't see why the v6 editor needs to add stuff to your code behind your back.
Is it possible to open the file in some way so as to see what it adds?

It's too bad they don't offer a download of the old 5.31 version of TB, that one works hassle free and is what I use all the time. After I get a program working like I want, I try running it under 5.5b19. If it can run without invoking the bugs inherent in that version, I will bind it with the 5.5 to circumvent having to drag around the dll's that 5.31 requires.

I don't know what else to suggest. I would consider it extremely unfortunate to have to go back to using line numbers.

Mike C.

Running and compiling programs on the command-line

Yes, I am writing code this way. It's quite easy.

You can write the code in any text editor. If you want to run your program (works both on TRU source and TRC compiled files), you can run:

tbsystem -i maze.tru

You can also compile your program to TRC format, if you would like to:

tbsystem -c maze.tru

You can add the root directory of your local True BASIC installation to the PATH. You can then run those commands from any directory.

By the way, the current owners offer the old 5.5 versions for sale, I have bought the 5.5 Silver edition recently.

line number


In the early days line numbers were required, but line numbers are in my opinion a major pain in the neck.

The thing is, if you have to insert some lines later, and don't have enough numbers left between your numbered lines, the hassle begins. Now perhaps the version 6 Editor has a feature which tries to help avoid this problem, by giving you the "error" message to leave 9 numbers open between numbers. In other words, always start off with numbers 10, 20, 30,... etc. That was the usual practice with line numbers back then, but TB never prompted you about this before. So that "feature" must be built into this new v.6 editor.

I never use line numbers. I see absolutely no benefit from their use. I have programs and libraries that are over a thousand lines long, and to "keep track" of line numbers I use a regular text editor which will indicate line numbers automatically for you, but the line numbers won't be part of the code, and therefore won't create problems of the type you are experiencing. (Note that TB programs are nothing but plain ASCII text files. They don't HAVE to be written in the TB editor, nor do they HAVE to have the extension ".tru".)

I write my code in a text editor, then save it as a .tru or .txt file; open it in the TB editor (I use the .v5's of True Basic) and run it from there. If the code has errors, I correct them in the text editor, save the changes, and repeat the above procedure. This works much better and quicker than it sounds.

If there is an error, TB will tell you the line number of the offending line, and you can find it easier in a regular text editor which shows line numbers.

The old TB editor has never been all that great anyway; and modern text editors have many extra features which are helpful. EditPad Lite is a good free one which I use. NotePad ++ is another good one. (I don't have the .v6 editor. Note that all the TB versions have the exact same core code.)

Meanwhile, if you are going to bother with line numbers, do like it says and use numbers that are in multiples of ten or more in order to leave room for corrections/additions to your code.

I hope this has been helpful.

Mike C.

line numbers

Thank you. My program has line numbers in multiples of ten. I have even tried inserting the first line of the program:
10 !autolinenum
The editor then numbers the next line 20 etc. I still get the same warning.
Any thoughts?

Line number in 6.x editor

I believe the 6.x editor has to add some lines to every program it runs/compiles. I'm pretty sure it's described in the 6.x docs somewhere.

I have not figured out yet, what the editor is doing exactly (it also modifies the source of programs not using line numbers). I vaguely recall reading somewhere that it generally needs about 10 lines and that the exact amount is depending on certain features being used (but as I said, I don't know the specifics, although I would like to know them).

So I guess the editor "works as designed" in your case.

But I fully agree with Mike C. that line numbers are an artifact of the early years of BASIC. If you're happy with lines, happily keep using them :) , but at least be aware that True BASIC is quite strong on providing modern alternatives for structuring code.

It has some interesting features, like DO WHILE and LOOP UNTIL combinations:


To this day, I find the True BASIC language itself to be beautifully designed.