View Issue Details

IDProjectCategoryView StatusLast Update
0037693FPCCompilerpublic2020-09-30 10:59
ReporterKai Burghardt Assigned ToFlorian  
Status resolvedResolutionwon't fix 
Product Version3.2.0 
Summary0037693: $mode ISO accepts underscores as part of identifiers
DescriptionISO 7185 states, identifiers may consist of letters and digits only.

However, FPC accepts underscores, too, although an underscore is neither a letter or digit
Steps To ReproduceThis program should fail to compile, yet it does:

{$mode ISO}
program _;
Additional InformationWe already implement the constraint that an identifier must not start with a digit, but with a letter. [Provided underscores are forbidden.]

Extended Pascal (ISO 10206), on the other hand, will allow underscores, but identifiers may not begin or end with underscores, nor is it allowed to use multiple underscores after another.
TagsNo tags attached.
Fixed in Revision
Attached Files


related to 0037739 resolvedFlorian {$mode ISO} accepts Extended Pascal block as a block 



2020-09-14 21:37

administrator   ~0125542

I think the ISO Pascal standard allows that extensions are supported, so this falls in into that category?

Kai Burghardt

2020-09-15 14:31

reporter   ~0125550

OK, yeeahhh… We can of course demote everything to a mere documentation issue. Surely $mode objFPC is “just” an amended version of ISO 7185 Pascal, “just” with the following differences: [… a long list …]

I don’t know what exactly the intention of $mode ISO is. As far as I understood it’s supposed to be an ISO-7185-compliant mode. E.g. you can’t can’t use units, or several other things, but also there’s the possibility to access file-buffer-variables.

I don’t mind if FPC allows it or not. It’s just one thing I spotted while studying the standard. If we deviate though, it should be documented.


2020-09-16 19:31

administrator   ~0125573

The scope of the ISO mode is to compile any ISO mode program but it does not disable extensions which do not interfere with ISO Pascal. The same applies to any other mode as well. This is in particular important as we do not supply a seperate system unit for everymode: the whole system unit is also available in all modes.


2020-09-26 16:29

administrator   ~0125878

As said in the comment before, ISO mode means FPC compiles ISO compliant programs. The ISO mode in FPC does not check for ISO only pascal. In particular as the ISO pascal standard allows extensions.

Issue History

Date Modified Username Field Change
2020-09-02 22:15 Kai Burghardt New Issue
2020-09-14 21:37 Florian Note Added: 0125542
2020-09-15 14:31 Kai Burghardt Note Added: 0125550
2020-09-16 19:31 Florian Note Added: 0125573
2020-09-26 16:29 Florian Assigned To => Florian
2020-09-26 16:29 Florian Status new => resolved
2020-09-26 16:29 Florian Resolution open => won't fix
2020-09-26 16:29 Florian FPCTarget => -
2020-09-26 16:29 Florian Note Added: 0125878
2020-09-26 16:33 Florian Relationship added related to 0037739