1) Turtle graphics, (pendown, penup, turnto, turn and move), are missing on Prospero Pascal.
Has anyone been able to implement these for that language ?
2) Restore, read and data are also missing, but I doubt if they can be emulated ?
(Workarounds are possible, if clumsy) !
Turtle graphics are not part of QDOS - They are implemented by the SuperBASIC interpreter. If you want them in Pascal, you'll need to implement a library (nice little educational task, btw).
RESTORE, READ and DATA are "interpreted-language constructs" and are entirely not needed in Pascal - Everything these statements do can much easier be implemented using CONST expressions in Pascal. (BTW: I rather think the BASIC way of storing constant data in the interpreted program is "clumsy". For every constant in DATA you need twice the amount of memory than you need in Pascal - a CONST is only stored once.)
Many thanks for your advice. It will save a lot of thrashing around !
I can convert turtle graphics using standard geometry routines. (I did such things many years ago, but they are lost on microtapes, so I will need to do them again...).
As for reading data, I must study the Pascal Manuals again, to see how to grab huge amounts of data using nested FOR loops. This is new domain for me, and I hope to find some useful examples, with any luck.
All this is needed for a program which produces optical illusions, with very short code, a few turtle instructions, but masses of data...
If the holiday weather turns foul, I will start work on it earnestly before autumn...
Regards,
Steve.
The Illusion program is now transcoded into Prospero Pascal, after the usual teething troubles :
Routines have to be entered in reverse call order. Apparently their is a Forward command to avoid this !
PENUP means calculating LINES, but not drawing them : Easy when twigged...
Turtle commands are easily calculated using cumulative trigonometry, even though verbose.
Restore, Read & Data : arrays were avoided using string-type integers to keep the code short,
For loops with STEP: meant using 'repeat-until' loops, with various counters.
Finally your 'keypressed' function has proved very useful for debugging !
My learning curve is improving rapidly now.
Many thanks again for your help.