Re: [fpc-pascal] Power operator fails in ordinal range definition

2024-11-14 Thread Hairy Pixels via fpc-pascal
On Nov 14, 2024 at 8:11:53 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > Because it wasn't deemed necessary that the compiler itself provides this > operator. > You can use it to create ordinal types from bytes using a generic. I was trying to do something like this.

Re: [fpc-pascal] Power operator fails in ordinal range definition

2024-11-14 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Do., 14. Nov. 2024, 08:03: > On Nov 14, 2024 at 1:53:17 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > >> The **-operator is not *implemented* by the compiler. It's provided >> through the Math unit. Thus you can't use it in cons

Re: [fpc-pascal] Power operator fails in ordinal range definition

2024-11-13 Thread Adriaan van Os via fpc-pascal
Hairy Pixels via fpc-pascal wrote: On Nov 14, 2024 at 1:53:17 PM, Sven Barth via fpc-pascal > wrote: The **-operator is not *implemented* by the compiler. It's provided through the Math unit. Thus you can't use it in constant declarations. Why is that

Re: [fpc-pascal] Power operator fails in ordinal range definition

2024-11-13 Thread Sven Barth via fpc-pascal
Hairy Pixels via fpc-pascal schrieb am Do., 14. Nov. 2024, 06:24: > This gives me "Error in type definition”. A bug? > > type > TMyRec = record > type > T = 0..256**4; > end; > The **-operator is not *implemented* by the compiler. It's provided through the Math unit. Thus you can't

Re: [fpc-pascal] Power operator fails in ordinal range definition

2024-11-13 Thread Hairy Pixels via fpc-pascal
On Nov 14, 2024 at 1:53:17 PM, Sven Barth via fpc-pascal < fpc-pascal@lists.freepascal.org> wrote: > The **-operator is not *implemented* by the compiler. It's provided > through the Math unit. Thus you can't use it in constant declarations. > Why is that? That means you can do powers in types o

[fpc-pascal] Power operator fails in ordinal range definition

2024-11-13 Thread Hairy Pixels via fpc-pascal
This gives me "Error in type definition”. A bug? type TMyRec = record type T = 0..256**4; end; Regards, Ryan Joseph ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-p