View Issue Details

IDProjectCategoryView StatusLast Update
0038051FPCCompilerpublic2020-11-09 06:17
ReporterMarģers Assigned ToSven Barth  
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Platformx86_64OSlinux 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0038051: compiler does not accept chr() as definition of ranged types.
DescriptionError: Identifier not found "chr" in line: type Tchr = chr(3)..chr(12);

more in forum:
https://forum.lazarus.freepascal.org/index.php/topic,52066.0.html
Steps To Reproduceprogram fuuffuu;

const cChr = chr(12); { Ok }

type Tcha = ord(3)..ord(12); { Ok }
type Tchz = 0000003..0000012; { Ok }
type Tcho = char(3)..char(12);{ Ok }
type Tchr = chr(3)..chr(12); { Error: Identifier not found "chr" }

type TArrChr = array [chr(3)..chr(12)] of char; { Ok }

var cz : 0000003..0000012; { Ok }
var ch : chr(3)..chr(12); { Error: Identifier not found "chr" }


var c : char;
begin
     c:=chr(12); { Ok }
end.
Additional Informationexample compiles fine in TP 7
TagsNo tags attached.
Fixed in Revision47353
FPCOldBugId
FPCTarget-
Attached Files

Activities

Bart Broersma

2020-11-08 10:33

reporter   ~0126787

Both Delphi (7.0) and TurboPascal (6.0) allow the typedefinition of Tchr = chr(3)..chr(12);
The complilation error in fpc is not dependant on the language mode.

Sven Barth

2020-11-08 23:23

manager   ~0126804

Please test and close if okay.

Issue History

Date Modified Username Field Change
2020-11-08 09:44 Marģers New Issue
2020-11-08 10:33 Bart Broersma Note Added: 0126787
2020-11-08 23:23 Sven Barth Assigned To => Sven Barth
2020-11-08 23:23 Sven Barth Status new => resolved
2020-11-08 23:23 Sven Barth Resolution open => fixed
2020-11-08 23:23 Sven Barth Fixed in Version => 3.3.1
2020-11-08 23:23 Sven Barth Fixed in Revision => 47353
2020-11-08 23:23 Sven Barth FPCTarget => -
2020-11-08 23:23 Sven Barth Note Added: 0126804
2020-11-09 06:17 Marģers Status resolved => closed