Re: [fpc-pascal] Generic constants with generic type

2021-04-21 Thread Sven Barth via fpc-pascal

Am 21.04.2021 um 17:59 schrieb Andrey Zubarev via fpc-pascal:

Ok. Thanks!
For this already there is a bug report? to notice when it will work?


Best keep an eye on this one and then test again once it's solved: 
https://bugs.freepascal.org/view.php?id=25678


Regards,
Sven
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Generic constants with generic type

2021-04-21 Thread Andrey Zubarev via fpc-pascal
Ok. Thanks!
For this already there is a bug report? to notice when it will work?

On Wed, Apr 21, 2021 at 2:12 PM Sven Barth via fpc-pascal <
fpc-pascal@lists.freepascal.org> wrote:

> Andrey Zubarev via fpc-pascal  schrieb
> am Mi., 21. Apr. 2021, 09:23:
>
>> Hi all!
>> With the existing syntax of constants, it is good to pass array
>> boundaries, but bad to initial parameter values. What do you think about
>> such constructs:
>>
>> GTValue=...
>>
>
> It is currently simply not possible to reference earlier type parameters
> inside the parameter clause. This affects code like this as well: generic
> TSomeGeneric>
> Once that is fixed your case will probably work as well as long as the
> type is one for which untyped constants can be declared.
>
> Regards,
> Sven
>
>> ___
> fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Generic constants with generic type

2021-04-21 Thread Sven Barth via fpc-pascal
Andrey Zubarev via fpc-pascal  schrieb am
Mi., 21. Apr. 2021, 09:23:

> Hi all!
> With the existing syntax of constants, it is good to pass array
> boundaries, but bad to initial parameter values. What do you think about
> such constructs:
>
> GTValue=...
>

It is currently simply not possible to reference earlier type parameters
inside the parameter clause. This affects code like this as well: generic
TSomeGeneric>
Once that is fixed your case will probably work as well as long as the type
is one for which untyped constants can be declared.

Regards,
Sven

>
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal