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

2020-11-08 Thread Anton Shepelev via fpc-devel
Bart: > Type > SubRange = Chr(1)..Chr(2); > begin > end. > > This compiles in TP 6.0 and Delphi 7.0, but fpc doesn't. It also compiles in BP 7.0, but why? I think it can work only if the compiler treats Chr(1) as a macro, not as a function. Does any dialect Pascal allow function invocations in

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

2020-11-08 Thread Anton Shepelev via fpc-devel
I wrote to Bart: > > Type > > SubRange = Chr(1)..Chr(2); > > begin > > end. > > > > This compiles in TP 6.0 and Delphi 7.0, but fpc doesn't. > > It also compiles in BP 7.0, but why? I think it can work > only if the compilers treats Chr(1) as a macro, not as a > function. Does any dialect Pascal

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

2020-11-08 Thread Florian Klämpfl via fpc-devel
Am 07.11.2020 um 23:00 schrieb Bart via fpc-devel: 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 i38

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

2020-11-08 Thread Sven Barth via fpc-devel
Florian Klämpfl via fpc-devel schrieb am So., 8. Nov. 2020, 22:18: > Am 07.11.2020 um 23:00 schrieb Bart via fpc-devel: > > 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