[fpc-devel] Fpc does not allow Chr() in type definition. Bug?

Bart bartjunk64 at gmail.com
Sat Nov 7 23:00:39 CET 2020


Hi,

Type
  SubRange = Chr(1)..Chr(2);
begin
end.

This compiles in TP 6.0 and Delphi 7.0, but fpc doesn't.

Free Pascal Compiler version 3.3.1 [2020/09/26] for i386
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Win32 for i386
Compiling test.pas
test.pas(2,14) Error: Identifier not found "Chr"
test.pas(2,28) Error: Error in type definition
test.pas(5) Fatal: There were 2 errors compiling module, stopping
Fatal: Compilation aborted

Is this a bug?

(Of course SubRange = #1..#2; compiles just fine)

-- 
Bart


More information about the fpc-devel mailing list