$mode ISO accepts underscores as part of identifiers
Original Reporter info from Mantis: kays @KaiBurghardt
-
Reporter name: Kai Burghardt
Original Reporter info from Mantis: kays @KaiBurghardt
- Reporter name: Kai Burghardt
Description:
ISO 7185 states, identifiers may consist of letters and digits only.
http://pascal-central.com/iso7185.html#6.1.3%20Identifiers
However, FPC accepts underscores, too, although an underscore is neither a letter or digit
http://pascal-central.com/iso7185.html#6.1.1%20General
Steps to reproduce:
This program should fail to compile, yet it does:
{$mode ISO}
program _;
begin
end.
Additional information:
We 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.
Mantis conversion info:
- Mantis ID: 37693
- OS: GNU/Linux
- OS Build: 4.2.0
- Build: 3.2.0+dfsg-7 [2020/08/21]
- Platform: x86_64
- Version: 3.2.0