Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ISO 7185 support #17

Open
electric-socket opened this issue Oct 27, 2020 · 2 comments
Open

Add ISO 7185 support #17

electric-socket opened this issue Oct 27, 2020 · 2 comments

Comments

@electric-socket
Copy link

Hi, my name is Paul.

I think it would be nice if XDPW was ISO 7185 (Standard Pascal) compliant. In the Github repository tangentstorm / pascal in the directory P5 is the file pcom.pas which is a(n old) Pascal compiler from 1974 that was co-written by Nicklaus Worth himself. It generates instructions for the fictional Pascal-P machine (an early predecessor to Java's JavaVM virtual machine). It is also self-hosting, compiles perfectly with FPC or with itself, but on XDPW it faults on line 1 because it has file parameters in the &&Program** statement, which was allowed then and is allowed under ISO 7185. These parameters are usually ignored, but can be used as file names for input or output files (a relic of the CDC mainframe Pascal was invented on. This program, or its companion PINT.PAS use no advanced features like objects or even strings and would be a good testbed to use to check compatibility with the standard.

Thank you very much for your attention.

Paul Robinson [email protected]
"The lessons of history teach us - if they teach us anything - that no one learns the lessons that history teaches us."

@Mazdaywik
Copy link

Mazdaywik commented Oct 27, 2020

Niklaus Wirth, not Worth 😉.

@vtereshkov
Copy link
Owner

vtereshkov commented Oct 27, 2020

Hi Paul. Unfortunately, I no longer maintain the project. But it's even more important that I always considered ISO 7185 a stillborn standard. I think the language it defines is hardly usable, since it lacks units, open arrays, type casts, break/continue/exit, named goto labels - but at the same time requires strict declaration order and has to support input/output pseudo-files, inter-procedural goto's, "dereferencing" file variables and other archaic or even dangerous features.

All these issues were clearly summarized by Brian Kernighan. I think everyone understood them well even in the 1980s. Borland extended Pascal to turn it into a completely different, incompatible but much more versatile Turbo Pascal, Wirth designed Modula-2, and even the ISO committee tried to fix the language and issued ISO 10206 (which was out of touch with the "natural" language development - and thus again stillborn).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants