Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2017-10

Plans to support various ISO modes

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dominik Rappaport

Hi,

I hope this question is not part of the FAQ list. What are the plans for FPC as to the support of the various ISO modes of Pascal? At the moment, there is a switch to enable "ISO" mode, but it's unclear to me which ISO standard this option enforces (Standard Pascal 1983 or 1990 or Extended Pascal). In particular, because even some features from Standard Pascal are missing:

For example, FPC:

1. Doesn't raise an error or warning if the wrong order of statements (var before type) is specified, as mandated by Standard Pascal
2. Doesn't raise an error or warning if "(input, output)" or an equivalent statement is missing after "program", as mandated by Standard Pascal
3. Doesn't implement the get and put procedure
4. Doesn't support Standard Pascal I/O (like f^ as the current input/output)
5. Doesn't implement conformant arrays

I've found an old statement where you referred everybody looking for strict ISO compliance to GNU Pascal. However, GNU Pascal has been discontinued, so the question arises, whether FPC is going to support a "strict Standard/Extended Pascal mode" (ideally both) with a full support of these standards.

Best regards,
Dominik

Reply by email

Sven Barth
to Dominik Rappaport

Am 22.10.2017 10:51 schrieb "Dominik Rappaport" :

Hi,

I hope this question is not part of the FAQ list. What are the plans for FPC as to the support of the various ISO modes of Pascal? At the moment, there is a switch to enable "ISO" mode, but it's unclear to me which ISO standard this option enforces (Standard Pascal 1983 or 1990 or Extended Pascal). In particular, because even some features from Standard Pascal are missing:

The ISO mode refers to Standard Pascal. In trunk there's also a new work-in-progress ExtPas mode.

For example, FPC:

1. Doesn't raise an error or warning if the wrong order of statements (var before type) is specified, as mandated by Standard Pascal
2. Doesn't raise an error or warning if "(input, output)" or an equivalent statement is missing after "program", as mandated by Standard Pascal

Patches welcome.

3. Doesn't implement the get and put procedure
4. Doesn't support Standard Pascal I/O (like f^ as the current input/output)

AFAIK these should be implemented in trunk.

5. Doesn't implement conformant arrays

It might be that these are supported in trunk as well, but I'm not sure.

I've found an old statement where you referred everybody looking for strict ISO compliance to GNU Pascal. However, GNU Pascal has been discontinued, so the question arises, whether FPC is going to support a "strict Standard/Extended Pascal mode" (ideally both) with a full support of these standards.

Trunk supports Standard Pascal good enough that the P5 code can be compiled without changes. And yes, the end goal is to have full support for both standards (especially for ExtPas, which is still in its infancy, patches are welcome).

Regards,
Sven

Reply by email

Marco van de Voort
to Sven Barth

In our previous episode, Sven Barth via fpc-pascal said:

FPC ISO modes are primarily geared to recompiling complaint code, not to reject standards corner cases.

5. Doesn't implement conformant arrays It might be that these are supported in trunk as well, but I'm not sure.

(Afaik conformant arrays are an optional part of standard pascal)

Trunk supports Standard Pascal good enough that the P5 code can be compiled without changes. And yes, the end goal is to have full support for both standards (especially for ExtPas, which is still in its infancy, patches are welcome).

Another problem that I can remember with iso mode is that there was some problem with passing fields that are in a variant records node to VAR parameters and while probably nonstandard, some versions of P4 relied on taking the ORD() of a pointer for pointermath.

Reply by email