Randy,

I think you and I are in complete agreement.

I was responding to Christoph & Ursula Grein's message which seemed to suggest 
(or was asking if) "D + 1 uses + of root_integer".
+ of root integer doesn't handle values of enumerated types.

That said, I see Christoph & Ursula Grein said in an earlier message:
"Further d+1 is a new syntax since d is not a numeric value"

So it looks like we're all agreeing with each other that these expressions 
don't work.

Joshua Fletcher
613-721-4405


-----Original Message-----
From: Randy Brukardt <[email protected]>
Sent: Friday, December 6, 2019 4:37 PM
To: 'Ada-Comment List' <[email protected]>
Subject: Re: [Ada-Comment] Fwd: Simplify declaring enumeration types when they 
have a rep clause

Fletcher, Joshua writes:

>The problem with this line of thinking is that enums are not numerical
types.
>
>C and D are not Integers.

I'm not sure whose line of thinking you are discussing. The message you were 
replying to appeared to me to be saying that it doesn't make sense. The D +
1 expression came from the original proposal and I complained about it in my 
original reply.

D + 1 is not a legal expression in Ada, since D is not any sort of integer.
It would be madness to adopt special rules only for this context -- we haven't 
done that anywhere else in Ada and I don't think it would be good precedent to 
set. (The closest thing is the "current instance" rules, but those apply in 
many contexts.)

I suppose Enum'Pos(D) + 1 would be legal in some contexts, but not this one, 
since Enum and presumably D are hidden from all visibility during their 
declaration.

I don't see any way to reconcile an expression like D + 1 with Ada rules.
And it seems to be a minor part of the proposal in any case.

               Randy.



________________________________________________________

You have received this message because you subscribed to the Ada-Comment 
mailing list. To leave the Ada-Comment list, send an email with 'leave 
Ada-Comment' in the body to [email protected]. For help on the other 
commands available, send 'help Ada-Comment' to the same address.
Problems? Send mail to [email protected]. This list is operated by the Ada 
Resource Association, Inc., PO Box 8685, New York NY 10116-8685.




“This message and/or attachments may include information subject to GD 
Corporate Policies 07-103 and 07-105 and is intended to be accessed only by 
authorized recipients. Use, storage and transmission are governed by General 
Dynamics and its policies. Contractual restrictions apply to third parties. 
Recipients should refer to the policies or contract to determine proper 
handling. Unauthorized review, use, disclosure or distribution is prohibited. 
If you are not an intended recipient, please contact the sender and destroy all 
copies of the original message.”

Reply via email to