Turbo Pascal issue under CP/M

Post your CP/M & TDOS questions here
User avatar
Wmaalouli
Posts: 155
Joined: Sat Jul 20, 2019 2:09 pm

Turbo Pascal issue under CP/M

Post by Wmaalouli » 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

User avatar
Milli
Site Admin
Posts: 224
Joined: Fri Jul 19, 2019 3:13 pm
Location: Beaver Falls PA
Contact:

Re: Turbo Pascal issue under CP/M

Post by Milli » Sun Jul 21, 2019 8:08 am

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.
Milli

User avatar
Wmaalouli
Posts: 155
Joined: Sat Jul 20, 2019 2:09 pm

Re: Turbo Pascal issue under CP/M

Post by Wmaalouli » Sun Jul 21, 2019 9:51 am

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...

User avatar
Wmaalouli
Posts: 155
Joined: Sat Jul 20, 2019 2:09 pm

Re: Turbo Pascal issue under CP/M

Post by Wmaalouli » 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.
Attachments
Turbo Pascal - Compiles.zip
(59.38 KiB) Downloaded 245 times

User avatar
Milli
Site Admin
Posts: 224
Joined: Fri Jul 19, 2019 3:13 pm
Location: Beaver Falls PA
Contact:

Re: Turbo Pascal issue under CP/M

Post by Milli » Sun Jul 21, 2019 12:45 pm

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
Milli

User avatar
Wmaalouli
Posts: 155
Joined: Sat Jul 20, 2019 2:09 pm

Re: Turbo Pascal issue under CP/M

Post by Wmaalouli » Sun Jul 21, 2019 12:47 pm

It is a TDOS disk already... Same issue under CP/M as well.

User avatar
Wmaalouli
Posts: 155
Joined: Sat Jul 20, 2019 2:09 pm

Re: Turbo Pascal issue under CP/M

Post by Wmaalouli » Sun Jul 21, 2019 11:41 pm

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.
Attachments
Turbo Pascal - Compiles.zip
(59.45 KiB) Downloaded 254 times

User avatar
pearsoe
Posts: 11
Joined: Sun Jul 21, 2019 3:28 pm

Re: Turbo Pascal issue under CP/M

Post by pearsoe » Mon Jul 22, 2019 1:17 am

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.

User avatar
Wmaalouli
Posts: 155
Joined: Sat Jul 20, 2019 2:09 pm

Re: Turbo Pascal issue under CP/M

Post by Wmaalouli » Mon Jul 22, 2019 9:31 am

Yes, that last disk works, but with the editor limitations mentioned.

lotonah
Posts: 14
Joined: Sat Jul 20, 2019 5:26 pm

Re: Turbo Pascal issue under CP/M

Post by lotonah » Tue Jul 23, 2019 5:08 am

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.

Post Reply