[fpc-pascal]Pascal Tutorial

Marco van de Voort marcov at stack.nl
Mon Jun 10 14:09:19 CEST 2002

> It tries to stick to the standard; allthough it doesn't.
> BTW. are there plans to make FreePascal compatible to standard Pascal?
> I think at least the unextended standard (ISO 7185 from 1990) should be 
> supported in full.

First:  _Why?_

There has been some discussion about this before. True standards compliancy 
is out of the question. 

Running an average program could be possible, for that
there are about 4 or 5 features, 3 or 4 of which need compiler support:

- interprocedural GOTO's  (from child-procedures back to parent procs)
   This is more involved than it looks at a first glance.
- support of bitfield packing of records (could be omitted I think)
- new() for variant records.  One can use this to only allocate mem for
   a certain variant, not the biggest size.
   This essentially makes new() a procedure with an undefined number of 
	paramters (since a record can have "infinitely")
   Probably the less intrusive one of the extensions.
- using procedure variables before specifying the type first.
   (procedure x(y : procedure (z:longint));

- Support for get^ and put^. There is a TP compatible implementation for that
   somewhere, so it would be pretty easy, using the objpas like construct
   to add it to system.

The big problem is that it is quite some lot of work, including the risk to
introduce bugs into the compiler and with that holding up the next major 
release (which already has a lot of useful features).

_And more importantly pretty much for nothing_. Some schools might find it
useful to teach in standard Pascal, but that is pretty much about it. The
core members don't feel very strong about it, both for educational reasons
(I myself learned it with TP, and my Pascal programming turned out
reasonably well) 
Real standard freaks will use a fully compliant (including ISO 100something)
compiler anyway.

So the use pretty much turns into the ability to be able to put "implements
BP and Delphi with some ISO extensions" on the website as definitions, which
would only make some new munition to fuel another discussion about
standards, C and the state of the world in the NGs.


CB Falconer (somebody from the ANSI group with some compiler) said he wanted
to check out FPC, to implement the ISO features end of the coming summer,
but I don't think he really has an idea of the size and complexity of the

More information about the fpc-pascal mailing list