[fpc-pascal] For .. in .. loops with sets and valued enums

Michael Van Canneyt michael at freepascal.org
Sat Jun 20 14:03:04 CEST 2015



On Sat, 20 Jun 2015, Jonas Maebe wrote:

> On 20/06/15 12:01, Michael Van Canneyt wrote:
>>
>>
>> On Sat, 20 Jun 2015, Jonas Maebe wrote:
>>
>>> On 20/06/15 11:41, Michael Van Canneyt wrote:
>>>> But it is a bug that the compiler does not give an error for the set
>>>> type. Please report it.
>>>
>>> Should it work with any set types at all? (I don't mean set variables,
>>> but set types) Or even with any type? It seems very much like something
>>> that was accidentally introduced, like what was reverted with
>>> http://wiki.freepascal.org/User_Changes_2.6.0#.3COrdinal.3E_in_.3CSet_type.3E_is_now_forbidden
>>
>> It should definitely work with sets, that was explicitly asked (I am
>> sure, because I asked). I use it in my code.
>
> Again: set *variables* or set *types*?

Ah sorry, I misunderstood your remark. Variables.
I don't see the point of allowing it on a set type. You can just as well use the underlying enum.

Michael.



More information about the fpc-pascal mailing list