Some recent discussions have centred around attaching REMarks to the top line of FOR loops. Here is an example ...
Code: Select all
100 FOR n = 1 TO 7 : REMark
110 PRINT n
120 END FOR n
Per Witte has pointed out that this is only allowable with SMSQ/E. On other systems such as QDOS, Minerva, etc. the REMark is illegal, with line 100 becoming a single-line FOR loop.
With SMSQ/E this would printout 1 2 3 4 5 6 7
Other systems would just printout 7 with line 120 being ignored – clearly unwanted behaviour.
Besides FOR, this type of error can also occur with REPeat, IF, SELect and WHEN constructs.
The new version of QLiberator checks for such REMarks. If the system is SMSQ/E then this is allowed, otherwise, an error is reported at the compile stage. The line number is clearly shown, allowing the programmer to move the REMark to somewhere else.
While checking all this, I came across some other minor bugs which I was able to sort out. Some variables have also been renamed – to make them more understandable. For details, see the README file.