TBedCompile.exe and Line Numbers

OS: Windows 7 Pro
TrueBasic version 6.006
TBedCOMPILE.exe does not tolerate line numbers in .tru file. If I perform a Do UnNum the compiler works just fine. But I want line numbers, they are referenced in my Print statements.



Hi Folks,

This is going to sound very messy, but historically there have been bugs in previous version 5 releases. Unfortunately, these bugs were not cured sequentially, so using later versions may well have cured some earlier bugs, but also raised new ones.

The Tbsystem.exe file for Version 5.31 does not report compile time errors in a way that can be handled by the editor - it just shows the errors list in faint grey (almost unreadable) in the output window.

Version 5.5b19 does produce a compile tme error report that can be used by the editor. As a result, the editor CHAINS to TBedCOMPILE just to check if there are any compile time errors. If there are none then control passes back to the editor which immediately CHAINS to the current TBSYSTEM.EXE to compile, run or bind the current program.

TBedCOMPILE.EXE is an executable program that was compiled and bound with version 5.5b19 which means that it can generate an error report, which it sends back to the editor. The editor itself is compiled and bound with version 5.31 so it cannot produce compile time error reports on its own.

You might ask, why not compile the editor with 5.5b19? In that way you wouldn't need TBedCOMPILE at all. Indeed so. The trouble is that version 5.5b19 has numerous other bugs that version 5.31 doesn't have. The editor wouldn't run at all if was bound with version 5.5b19.

There are other complications that are responsible for problems with line numbers. Firstly, neither version 5.5b19 nor version 5.31 TBsystem.exe allows the output window to be retained. When a program ends the screen is immediately cleared. The user is given no opportunity to click the mouse or press any key to exit. As a result a routine has to be added to every user program prior to the END statement. Moreover there is a bug in all versions of the TBsystem file that prevents correct screen printing. Some extra lines of code have to be added to all user programs to compensate for this. In practice the users program is copied, and these extra lines are inserted into the copy.

It seems there is an error in the line numbering system of these extra lines, which explains the curious error messages. I will attend to this in the next release.

This is not the whole story, but it explains why the editor works the way it does. For example; version 5.31 cannot print to HP printers, whereas version 5.5b19 can. As a result anything that involves hard copy printing has to be done by chaing to a special program that was bound with version 5.5b19. Another example is that no version of the TBsystem file has provision for stopping a running program. As a result the editor has to chain to yet another stand alone program to perform this function.

I hope that clarifies the picture.
Big John

re: line numbers

This is really a question for Big John who is the author of the editor. I suspect the solution is simple--namely redirecting the 'compile' command in the editor back to tbsystem rather than to tbedcompile. Not sure why tbedcompile is there, but it probably involves the fact that the editor is a tbsystem 5.31 program (for a number of technical reasons) but is supposed to allow you to use any system version you want--including the most recent 5.5x releases. In fact Version 6 comes with both the 531 and most recent systems. I suspect that the editor compile command still pointing to tbedcompile is an oversight. Why that compiler doesn't deal with line numbers, I have no idea, but I concur on the behavior you see--tried it and got the same results. Anyway--this is one for John.


TBedCompile.exe and Line Numbers

OS: Windows 7 Pro
TrueBasic Gold ver 6.006

1 Line1
20 Line2
TBedCOMPILE error report says these line numbers are too close together.

1000 Line1
1010 Line2
1020 Line3
TBedCOMPILE error report says that Lines -7,-4,-3 are illegal line numbers. What do negative line numbers mean? Older versions
of TrueBasic accept these line numbers.

The TBSystem compiler works perfectly. Line numbers are no problem
for it. Maybe whoever did the TBSystem compiler can fix the
TBedCOMPIL compiler!