Does not recognize ISO 7185 standard label
Original Reporter info from Mantis: samiam95124
-
Reporter name: Scott Franco
Original Reporter info from Mantis: samiam95124
- Reporter name: Scott Franco
Description:
Does not see the goto labels 0001 and 1 as the same. The ISO 7185 standard says:
6.1.6 Labels
Labels shall be digit-sequences and shall be distinguished by their apparent integral values and shall be in the closed interval 0 to 9999. The spelling of a label shall be its apparent integral value.
label = digit-sequence .
from:
http://www.pascal-central.com/iso7185.html#6.1.6%20Labels
Steps to reproduce:
C:\projects\PASCAL\pascal-p5>fpc -Miso test.pas
Free Pascal Compiler version 3.2.0 [2020/06/04] for i386
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling test.pas
test.pas(6,11) Error: Identifier not found "1"
test.pas(6,12) Error: identifier isn't a label
test.pas(8,1) Error: Label used but not defined "1"
test.pas(9) Fatal: There were 3 errors compiling module, stopping
Fatal: Compilation aborted
Error: C:\FPC\3.2.0\bin\i386-Win32\ppc386.exe returned an error exitcode
C:\projects\PASCAL\pascal-p5>cat test.pas
program test;
label 0001;
begin
goto 1;
1:
end.