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?
QPTR demo Paint.bas
-
- Trump Card
- Posts: 162
- Joined: Tue Nov 30, 2021 1:19 am
Re: QPTR demo Paint.bas
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
Thank you - that was the problem!ones' complement wrote:Vaguely I seem to recall it may have something to do with OUTLN (https://www.theqlforum.com/viewtopic.php ... tln#p28202)
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 ...
-
- Font of All Knowledge
- Posts: 4684
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: QPTR demo Paint.bas
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.
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.
Regards,
Derek
Derek
Re: QPTR demo Paint.bas
Yes, but that was easy to spot, even for me. I changed it to isCompiled as soon as I loaded the program.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.
Please, can you send me you modified Paint_bas code?
-
- Font of All Knowledge
- Posts: 4684
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: QPTR demo Paint.bas
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.
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.
Regards,
Derek
Derek
Re: QPTR demo Paint.bas
Yes, all of them.Derek_Stewart wrote:Did you rename all the compiled variables?
-
- Font of All Knowledge
- Posts: 4684
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: QPTR demo Paint.bas
HI Andrew,Andrew wrote:Yes, but that was easy to spot, even for me. I changed it to isCompiled as soon as I loaded the program.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.
Please, can you send me you modified Paint_bas code?
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.
Regards,
Derek
Derek