Page 1 of 2

Turbo Pascal issue under CP/M

Posted: Sat Jul 20, 2019 6:18 pm
by Wmaalouli
Hi.
I just tried for the first time Turbo Pascal 3 under CP/M, but it refuses to compile anything, throwing the error "BEGIN EXPECTED" every time even with the simplest of test programs like the one below:

Code: Select all

program Test;
begin
	writeln('Hello World!');
end.
I tried entering that program using ADAMED as well as the TP3 integrated editor with similar results. Not sure if it's my installation at fault or TP3 does not like the Adam environment... Could someone please test this out for me on their machine and let me know what you get?

-Walid

Re: Turbo Pascal issue under CP/M

Posted: Sun Jul 21, 2019 8:08 am
by Milli
Wmaalouli wrote:
Sat Jul 20, 2019 6:18 pm
Hi.
I just tried for the first time Turbo Pascal 3 under CP/M, but it refuses to compile anything, throwing the error "BEGIN EXPECTED" every time even with the simplest of test programs like the one below:

Code: Select all

program Test;
begin
	writeln('Hello World!');
end.
I tried entering that program using ADAMED as well as the TP3 integrated editor with similar results. Not sure if it's my installation at fault or TP3 does not like the Adam environment... Could someone please test this out for me on their machine and let me know what you get?

-Walid
Is the period after the end in your real code? It should be a semicolon and from looking at code I don't think you need the "program Test;" line.

Re: Turbo Pascal issue under CP/M

Posted: Sun Jul 21, 2019 9:51 am
by Wmaalouli
Milli wrote:
Sun Jul 21, 2019 8:08 am
Is the period after the end in your real code? It should be a semicolon and from looking at code I don't think you need the "program Test;" line.
All Pascal program must end with a end. statement. And yes, in Turbo Pascal, the program heading is optional but it's a good habit to have anyway :)
I am totally stumped as to why I am getting that error. It's not like this is my first Pascal program! Something fishy is going on here with TP3 and the Adam...

Re: Turbo Pascal issue under CP/M

Posted: Sun Jul 21, 2019 10:40 am
by Wmaalouli
I found a copy of TP3 on the Adam Archive which sort of works, in that it will hang if one tries to edit a file using the TP3 integrated editor, but will however compile an external source file, such as one created with ADAMED. It's become clear that TP3 is not working well with the ADAM CP/M for some reason or other. It bugs me that I can't figure it out, but I guess I can live with that :)
Nonetheless, for my purposes at least, as long as it can compile a source file, then it will serve its intended purposes, particularly since I did not intend on using the TP3 editor anyway.
Here's a copy of the disk.

Re: Turbo Pascal issue under CP/M

Posted: Sun Jul 21, 2019 12:45 pm
by Milli
Wmaalouli wrote:
Sun Jul 21, 2019 10:40 am
I found a copy of TP3 on the Adam Archive which sort of works, in that it will hang if one tries to edit a file using the TP3 integrated editor, but will however compile an external source file, such as one created with ADAMED. It's become clear that TP3 is not working well with the ADAM CP/M for some reason or other. It bugs me that I can't figure it out, but I guess I can live with that :)
Nonetheless, for my purposes at least, as long as it can compile a source file, then it will serve its intended purposes, particularly since I did not intend on using the TP3 editor anyway.
Here's a copy of the disk.
Try it on TDOS

Re: Turbo Pascal issue under CP/M

Posted: Sun Jul 21, 2019 12:47 pm
by Wmaalouli
It is a TDOS disk already... Same issue under CP/M as well.

Re: Turbo Pascal issue under CP/M

Posted: Sun Jul 21, 2019 11:41 pm
by Wmaalouli
Here's a version that will not hang when editing a file using the TP3 editor, and will compile. However, the editor will corrupt the screen when it gets to the bottom rather than scroll up.
Final conclusion: the TP3 editor is simply not usable with the Adam. You will have to use an external editor and import the source file for compilation.

Re: Turbo Pascal issue under CP/M

Posted: Mon Jul 22, 2019 1:17 am
by pearsoe
Did you ever get it to run? I typed in the same code and it compiled and ran fine with the latest disk you uploaded.

Re: Turbo Pascal issue under CP/M

Posted: Mon Jul 22, 2019 9:31 am
by Wmaalouli
Yes, that last disk works, but with the editor limitations mentioned.

Re: Turbo Pascal issue under CP/M

Posted: Tue Jul 23, 2019 5:08 am
by lotonah
I wonder what the difference is between the two versions? I'm wondering if the terminal settings in the editor that works are different than the one that doesn't. If the non-working editor can be modified (using TINST, in case you've never done it before) with the same settings as the working one, then you are back in business.

Personally, I don't have the patience. I've gone back to using TP3 under MS-DOS when I need my Pascal fix.