[fpc-other] SuperPascal and FPC: a gross calumny :-)

Marco van de Voort marcov at stack.nl
Tue Apr 22 11:10:34 CEST 2014


In our previous episode, Mark Morgan Lloyd said:
> According to http://en.wikipedia.org/wiki/SuperPascal#Implementation, 
> Per Brinch Hansen's SuperPascal can by compiled by GNU Pascal but not by 
> FPC. Does anybody have time to look at this (I certainly don't right now).

I did, and it compiles fine with trunk and -Miso. (2.6.x has this mode
already but it is less complete than trunk)

It needs slightly more modifications than GNU Pascal, but probably that is
because GPC accepts "C" preprocessor commands and extended pascal
reset/rewrite statements also in iso lev 1 mode.  (probably you need pass
some "strict" flag to get GPC to error on that).

All things needing fixing were marked in the original source as non standard
except for the C preprocessor (probably because it is considered part of the
build process, not the dialect)
 
I updated wikipedia with the needed modifications.  

> The source is apparently available as a shell archive at 
> http://brinch-hansen.net/software.shar, which implies that it would be 
> easiest to start on a unix (rather than Windows) system.

I routinely install cygwin with the complete "archiver" section on Windows
machines, and I had unshar readily available without additional actions. A
habit that saves a lot of time :-)

The "clock" problem is easily fixed on Windows by using gettickcount. (which
matches the description of time in ms, though maybe not relative to what)

I zipped the whole shebang and put it on

http://www.stack.nl/~marcov/superpascal.zip




More information about the fpc-other mailing list