[J3] US21 INT for enum type

Van Snyder van.snyder at sbcglobal.net
Fri Oct 15 18:14:42 UTC 2021


The interpretation of relational intrinsic operations with enumeration-
type operands is described in 10.1.5.5.1p9 [162:14-15].

I don't think malcolm needs to write a paper.

=======================================================================
========

I had a vague recollection of having checked this some time ago. I just
looked again. According to Table 10.2 on page 156, objects of
enumeration type are allowed as operands in relational intrinsic
operations.

On Fri, 2021-10-15 at 12:05 +0900, Malcolm Cohen via J3 wrote:
> Hi John,
>  
> I agree they would be useful. I will add to my paper.
>  
> Thanks again,
>  
> Cheers,
> -- 
> ..............Malcolm Cohen, NAG Oxford/Tokyo.
>  
> From: J3 <j3-bounces at mailman.j3-fortran.org> On Behalf Of John Reid
> via J3
> Sent: Friday, October 15, 2021 12:03 AM
> To: General J3 interest list <j3 at mailman.j3-fortran.org>
> Cc: John Reid <John.Reid at stfc.ac.uk>; Malcolm Cohen <malcolm at nag-
> j.co.jp>
> Subject: Re: [J3] US21 INT for enum type
>  
> 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.
> >
> 
> Disclaimer
> The Numerical Algorithms Group Ltd is a company registered in England
> and Wales with company number 1249803. The registered office is: 30
> St. Giles, Oxford, OX1 3LE, United Kingdom. Please see our Privacy
> Notice for information on how we process personal data and for
> details of how to stop or limit communications from us.
> 
> This e-mail has been scanned for all viruses and malware, and may
> have been automatically archived by Mimecast Ltd, an innovator in
> Software as a Service (SaaS) for business.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.j3-fortran.org/pipermail/j3/attachments/20211015/86e24033/attachment.htm>


More information about the J3 mailing list