[J3] US21 INT for enum type

John Reid John.Reid at stfc.ac.uk
Thu Oct 14 15:02:53 UTC 2021


Malcolm,

And what about the operators, ==, /=, <, <=, >, >=? They are not allowed 
for operands of enum type according to Table 10.2 (page 156). I think 
this needs to be allowed with a rule like we have for assignment (Table 
10.8 on page 170).

Cheers,

John.


Malcolm Cohen via J3 wrote:
>
> Hi John,
>
> > I have not found it said anywhere that varables of enum type are 
> integers.
>
> Correct, they are of enum type, not integer type.
>
> > However, INT does not provide conversion from enum type. Is this a 
> mistake?
>
> Yes, that is an omission. Looking at the specs, (21-110r1), it does 
> not say that INT is available for enum type, but in several places (in 
> particular, spec (I), for i/o) – implies that we were expecting it to 
> be available.
>
> I will write a paper. Thanks for noticing this.
>
> Cheers,
>
> -- 
>
> ..............Malcolm Cohen, NAG Oxford/Tokyo.
>



More information about the J3 mailing list