New QLiberator v3.37

Anything QL Software or Programming Related.
EmmBee
Trump Card
Posts: 240
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: New QLiberator v3.37

Post by EmmBee »

stevepoole wrote:Would it be possible to allow keywords such as LIST etc to be recognised, to make programs be compatible with, say, QPC2 .
I've looked further into this. The case of LIST and others has already been catered for. These type commands get the message of Warning..Procedure cannot be compiled. There is currently a list of 13 such names. We can now add "ED", "LIBERATE" and "INSTR_CASE".
pjw wrote:Well, theres DIV and MOD for starters: SMSQ/E works on long integers, Qdos on word. But Qlib uses its own internal word-sized routines. Making those long shouldnt hurt.
DIV and MOD currently use integers in QLIB. Changing these to use longs will benefit all platforms. I don't do any assembler coding myself, so I will leave this to others to modify the RUNTIMES module.


stevepoole
Super Gold Card
Posts: 714
Joined: Mon Nov 24, 2014 2:03 pm

Re: New QLiberator v3.37

Post by stevepoole »

Hi All,

Here is a function called MOD_ which returns numbers (+/- 999999999), with a test demo. No Division by zero allowed !
Steve

100 ::
110 REMark Huge MODulus, v6apr20
120 :
130 n=2
140 FOR x=-n TO n
150 FOR y=-n TO n
160 IF y<>0
170 a=MOD_(x,y): b=x MOD y
180 PRINT#0, x!y!MOD_(x,y)!!x MOD y,: PAUSE 25
190 IF a<>b: BEEP 32765,8: PAUSE
200 END IF
210 END FOR y
220 END FOR x
230 PRINT#0, MOD_('999999999','123456789')
240 :
250 DEFine FuNction MOD_(nb,md)
260 RETurn nb-(INT(nb/md)*md)
270 END DEFine
280 ::


EmmBee
Trump Card
Posts: 240
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: New QLiberator v3.37

Post by EmmBee »

pjw wrote:I have tried to create a minimalist test program that would end up being compiled differently on 3.36 and 3.37, but to no avail (so far).
Try this one-line program ...

Code: Select all

140 FOR a = 1 TO LEN(word$) : IF word$(a)<>" " THEN EXIT a
Compile this on v3.36, then again on v3.37


User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: New QLiberator v3.37

Post by RalfR »

EmmBee wrote:
pjw wrote:I have tried to create a minimalist test program that would end up being compiled differently on 3.36 and 3.37, but to no avail (so far).
Try this one-line program ...

Code: Select all

140 FOR a = 1 TO LEN(word$) : IF word$(a)<>" " THEN EXIT a
Compile this on v3.36, then again on v3.37
I have compiled it under QPC2 with 3.36 and Martin's original decompiled 3.36, same error:
QLib_error.JPG
BTW: would be good, if QLib can say, which variable is undefined.

Now compiled with 3.37:
QLib_error_337.JPG
Makes me wonder..... 10,2 means, it does not recognize the "TO" statement...?
Last edited by RalfR on Fri Apr 10, 2020 9:02 am, edited 2 times in total.


4E75 7000
EmmBee
Trump Card
Posts: 240
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: New QLiberator v3.37

Post by EmmBee »

On my setup, it just compiles without any error message - on v3.36
Try this instead ...

Code: Select all

100 word$ = "some word"
110 FOR a = 1 TO LEN(word$) : IF word$(a)<>" " THEN EXIT a
Try to compile this both with 3.36 and 3.37


User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: New QLiberator v3.37

Post by RalfR »

Just have added 3.37 to my last post...

The different line number...?


4E75 7000
User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: New QLiberator v3.37

Post by RalfR »

EmmBee wrote:On my setup, it just compiles without any error message - on v3.36
Try this instead ...

Code: Select all

100 word$ = "some word"
110 FOR a = 1 TO LEN(word$) : IF word$(a)<>" " THEN EXIT a
Try to compile this both with 3.36 and 3.37
The same compile error.


4E75 7000
EmmBee
Trump Card
Posts: 240
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: New QLiberator v3.37

Post by EmmBee »

I've just discovered the error is caused by my skip_Top_Line_Remark routine at line 32492 in v3.37
Besides storing the file position, recording and then restoring the variables sym1%, sym2%, sym3, etc. seems to cure the problem.

I'm currently in the process of checking all the code out for the v3.38 update.
BTW: would be good, if QLib can say, which variable is undefined.
Yes, I agree. I'll add this in.


User avatar
RalfR
Aurora
Posts: 872
Joined: Fri Jun 15, 2018 8:58 pm

Re: New QLiberator v3.37

Post by RalfR »

EmmBee wrote:I've just discovered the error is caused by my skip_Top_Line_Remark routine at line 32492 in v3.37
Besides storing the file position, recording and then restoring the variables sym1%, sym2%, sym3, etc. seems to cure the problem.

I'm currently in the process of checking all the code out for the v3.38 update.
BTW: would be good, if QLib can say, which variable is undefined.
Yes, I agree. I'll add this in.
Thanks anyway for your effort! :)


4E75 7000
EmmBee
Trump Card
Posts: 240
Joined: Fri Jan 13, 2012 5:29 pm
Location: Kent

Re: New QLiberator v3.37

Post by EmmBee »

I've been reading the Q_Liberator Release Notes for RELEASE 3.31 June 1990. It contains this ...

COMPILER CONFIGURATION

Users who have a copy of the QJump level 1 configurator, config, can now
use this utility to modify the compiler, QLIB_OBJ. The colour sheme and
various compiler defaults including stack, heap, and buffer size can
be configured.

I've tried to use this, but to no avail. It doesn't seem to list any _obj files. Even if I type the name Ram2_Qlib_obj it just reports not found.
Perhaps we should install a more up-to-date MenuConfig, which I believe is freeware?


Post Reply