Ralf R. wrote:Martin_Head wrote:If the original program was compiled without retaining the line numbers. Then the decompiled output may have line numbers greater than the 32000 limit of BASIC. In this case you will need to split the BASIC program in two parts. The first part can be loaded and then renumbered.
The second part will have to be renumbered by hand to follow the first part. Then merged back together again.
That is interesting. The decompiler does not see, if more than one statement was in the original source but the error console of QLib has no problem to show the line (albeit with no line number). So, if QLiberator splits all statements in a separate line, there must be another kind of handling the line numbers, in this case, they can be greater than 32767.
The compiled SuperBASIC program does not have any kind of markers in the program to show where lines start, or end. So it's just one long line number less program.
If when you compile, you keep the line numbers, then a table is created of the line numbers, and pointers to where the lines start in the compiled SuperBASIC program.
If the line number table exists, then the decompiler uses it to know there lines start and end, and what the decompiled line number should be. So it won't produce line numbers greater then 32000. And you may see multi statement lines.
If the line number table doe's not exist, then the decompiler will produce single statement lines, as it does not know where lines start and end. It also has to 'make up' a line number. This made up line number is comprised of an offset from the start of the program, +100. This can cause line numbers greater then 32000 to be produced if the the compiled program is large.