comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Parentheses around conditional/quantified expressions
Date: Mon, 08 Oct 2012 13:26:08 +0200
Date: 2012-10-08T13:26:05+02:00	[thread overview]
Message-ID: <5072b84d$0$6558$9b4e6d93@newsspool4.arcor-online.net> (raw)

The following source text is not accepted by GNAT:

package Instance is new Generic (for Some J in 1 .. 10 => True);

where generic package Generic has a single Boolean formal
parameters. GNAT says, "quantified expression must be parenthesized"
Are parentheses needed, or does GNAT just not support this case yet?

LRM 4.5.7 and 4.5.8 say, respectively,

"Wherever the Syntax Rules allow an expression,
 a conditional_expression may be used in place of the expression,
 so long as it is immediately surrounded by parentheses."

"Wherever the Syntax Rules allow an expression,
 a quantified_expression may be used in place of the expression,
 so long as it is immediately surrounded by parentheses."

GNAT does accept:

package Instance is new Generic ((for Some J in 1 .. 10 => True));



             reply	other threads:[~2012-10-16  1:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 11:26 Georg Bauhaus [this message]
2012-10-08 12:51 ` Parentheses around conditional/quantified expressions Marc C
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox