Page 2 of 2
Re: John Conway: Game Over
Posted: Thu Apr 16, 2020 8:32 am
by tofro
tcat wrote:
Prospero Pascal, just curious how it compares to C1 Pascal, the one I have. C1 can run on plain QL, but have not tried yet, just read the manual.
PP is probably the most professional Pascal compiler for the QL (runs on both QL and SMSQ/E). While C1 compiles into P-Code, PP creates full-blown machine code programs. The extensions
to Pascal that PP provides are relatively close
to TurboPascal, so definitively a recommendation. What's impressive is its LONGREAL type (64-bit REAL) the best floating point Pascal for the QL.
Tobias
Re: John Conway: Game Over
Posted: Thu Apr 16, 2020 12:28 pm
by tofro
swensont wrote:Tofro,
Nice job on the Pascal, esp. in just an hour. I'm very rusty with my Pascal. I like how you did the key input since the screen is SCR and not CON.
Tim
Hi Tim,
actually, all windows opened by Prospero Pascal using WOpen are CON_soles.
What PP is missing in its library, is a no-echo, non-blocking keyboard query routine (Like Turbo Pascal's "KeyPressed" function). But that's easily amended using QDOS traps.
The ConSilent function in PP actually
waits for a key press, which is not useful if you want the Game of Life generations pass by but still have the option
to interrupt the simulation with a key press.
Tobias
Re: John Conway: Game Over
Posted: Fri Apr 17, 2020 12:55 am
by swensont
Tofro,
> actually, all windows opened by Prospero Pascal using WOpen are CON_soles.
Page II-74 of the Pascal manual says:
"associates the Pascal file variable w with the QL console driver device SCR_......... (which is in fact the default SCR_ device)."
I read that to mean that when opening with Wopen, all you get is a SCR device (output only) and not a CON device (input/output). IIRC, I had the same issue with Pro Fortran.
Tim
Re: John Conway: Game Over
Posted: Fri Apr 17, 2020 7:42 am
by tofro
swensont wrote:Tofro,
> actually, all windows opened by Prospero Pascal using WOpen are CON_soles.
Page II-74 of the Pascal manual says:
"associates the Pascal file variable w with the QL console driver device SCR_......... (which is in fact the default SCR_ device)."
I read that to mean that when opening with Wopen, all you get is a SCR device (output only) and not a CON device (input/output). IIRC, I had the same issue with Pro Fortran.
Tim
Tim,
I think the manual is wrong or at least misleading. Checking the opened channels with QPAC2
Channels shows they're all CON_ channels.
Tobias
Re: John Conway: Game Over
Posted: Sat Apr 18, 2020 7:19 pm
by polka
Hi all !
My
personnal hommage to Conway''s game of life
and a link
to my SuperForth code published here :
https://www.qlforum.co.uk/viewtopic.php ... 1330#p1330
May the FORTH be with John, forever !
POLKa
Re: John Conway: Game Over
Posted: Sat Apr 18, 2020 8:01 pm
by Derek_Stewart
Hi,
Excellent programme, I have dabbled a little in Forth, but not much.
I had a laptop running ForthOS, which ran nicely on a 486 CPU.
I quite like Superforth, I should spend more time with it.
I will open s new thread about Forth.
Re: John Conway: Game Over
Posted: Mon May 04, 2020 3:50 am
by swensont
Tofro,
I've got around to trying to use WOPEN to create a console window (wopen(con1,512,256,0,0). I used it at the start of my program and all input and output is using con1. The first time I compiled and ran, I got "Error F - no reset". So I added a reset to con1 and then I got "Error D - Illegal for SCR - SCR_512x256a0x0". I am using read() and readln(). It's looking like the manual is correct that wopen is only for SCR (output only) windows.
Tim Swenson
Re: John Conway: Game Over
Posted: Mon May 04, 2020 8:23 am
by tofro
Tim,
I just checked again:
Obviously, I was mis-led by the QPAC2 "Channels" app : This lists all screen channels as "CON_soles", even if they are "SCR_eens" only.
Sorry for the confusion.
If you want a CON_sole, you can easily use
Code: Select all
Assign (StatusBar, 'con_180x204a42x30');
Rewrite (StatusBar);
instead of WOpen
Tobias
Re: John Conway: Game Over
Posted: Tue May 05, 2020 11:05 am
by mk79
tofro wrote:Obviously, I was mis-led by the QPAC2 "Channels" app : This lists all screen channels as "CON_soles", even if they are "SCR_eens" only.
Oh right. The code
to determine channel names is pretty dirty, but if I ever release another QPAC2 this will be fixed
Cheers, Marcel