Page 1 of 1

QPTR demo Paint.bas

Posted: Mon Sep 19, 2022 10:13 am
by Andrew
I try to learn a bit more PE programming - and hit a snag.
Demo program PAINT_bas from QPTR runs ok on QEMULATOR QDOS + PE but does not run on QPC SMSQE
On QPC II program starts, interface is displayed. But click on menu does nothing. The program is not frozen and can be stopped by Ctrl - Space.
The compiled version (from QPTR demos) runs both on QEmulator and QPC II
So question is: What generates this strange behaviour?

Re: QPTR demo Paint.bas

Posted: Mon Sep 19, 2022 12:05 pm
by ones' complement
Vaguely I seem to recall it may have something to do with OUTLN (https://www.theqlforum.com/viewtopic.php ... tln#p28202)

Re: QPTR demo Paint.bas

Posted: Mon Sep 19, 2022 12:33 pm
by Andrew
ones' complement wrote:Vaguely I seem to recall it may have something to do with OUTLN (https://www.theqlforum.com/viewtopic.php ... tln#p28202)
Thank you - that was the problem!
paint_bas needs OUTLN also when it's not compiled.
Added line 1115 OUTLN #0 ,512,256,0,0 and now it works.

Still wondering why it was working on QDOS+PE without having OUTLN ...

Re: QPTR demo Paint.bas

Posted: Mon Sep 19, 2022 2:24 pm
by Derek_Stewart
Hi,

I was rewriting the Paint program, but never got it completed, I wiĺl have a look into what stage I am at.

There is another issue with the QPTR PAINT_BAS program, it uses the variable compiled to detect wether it is compiled. But if Turbo Toolkit is loaded, there is a COMPIKED keyword added to the interpreter, so that fails as well.

Re: QPTR demo Paint.bas

Posted: Mon Sep 19, 2022 2:52 pm
by Andrew
Derek_Stewart wrote:There is another issue with the QPTR PAINT_BAS program, it uses the variable compiled to detect wether it is compiled. But if Turbo Toolkit is loaded, there is a COMPIKED keyword added to the interpreter, so that fails as well.
Yes, but that was easy to spot, even for me. I changed it to isCompiled as soon as I loaded the program.
Please, can you send me you modified Paint_bas code?

Re: QPTR demo Paint.bas

Posted: Mon Sep 19, 2022 7:14 pm
by Derek_Stewart
Hi,

Did you rename all the compiled variables?

I have not done much on the updated version, I check it out and get back to you.

Re: QPTR demo Paint.bas

Posted: Mon Sep 19, 2022 7:24 pm
by Andrew
Derek_Stewart wrote:Did you rename all the compiled variables?
Yes, all of them.

Re: QPTR demo Paint.bas

Posted: Tue Sep 20, 2022 8:55 am
by Derek_Stewart
Andrew wrote:
Derek_Stewart wrote:There is another issue with the QPTR PAINT_BAS program, it uses the variable compiled to detect wether it is compiled. But if Turbo Toolkit is loaded, there is a COMPIKED keyword added to the interpreter, so that fails as well.
Yes, but that was easy to spot, even for me. I changed it to isCompiled as soon as I loaded the program.
Please, can you send me you modified Paint_bas code?
HI Andrew,

I looked a my attempts to modify Paint, which looks like what you have already done, I was also trying to add Config Blocks to the code, which was the point I stopped, as I did not know how.

I was reading the documentation.