comp.lang.ada
 help / color / mirror / Atom feed
* Parentheses around conditional/quantified expressions
@ 2012-10-08 11:26 Georg Bauhaus
  2012-10-08 12:51 ` Marc C
  0 siblings, 1 reply; 2+ messages in thread
From: Georg Bauhaus @ 2012-10-08 11:26 UTC (permalink / 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));



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-16  1:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-08 11:26 Parentheses around conditional/quantified expressions Georg Bauhaus
2012-10-08 12:51 ` Marc C

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