comp.lang.ada
 help / color / mirror / Atom feed
From: pearson%anchor.DECnet@LLL-ICDC.ARPA ("ANCHOR::PEARSON")
Subject: Why is "for i in 1..2*2 loop" illegal?
Date: Thu, 10-Jul-86 18:50:00 EDT	[thread overview]
Date: Thu Jul 10 18:50:00 1986
Message-ID: <8607102356.AA28600@ucbvax.Berkeley.EDU> (raw)


Our VAX Ada compiler reads me the riot act when I say
	"for I in 1..2*2 loop".
(Specifically, it says:

	Base type {universal_integer} is not allowed for the
	discrete range of a constrained array definition,
	iteration rule, or index of an entry familys

	Default resolution to INTEGER does not apply because
	an expression is not a literal, named number or
	attribute; however, INTEGER assumed

A slightly fancier version of this compiler points me to LRM section
3.6.1 paragraph 2.)

    I imagine that this trivial expression (2*2) is somehow a representative
of a Bigger Problem, an understanding of which would allow me to see why
2*2 is unmanageably more difficult than 4. But I can't seem to grok the
big picture. If you have an explanation ( TARGET_IQ => 86 ), I'd appreciate
seeing it.

  -  Peter.
(pearson%anchor.decnet@lll-icdc.arpa)
------

                 reply	other threads:[~1986-07-10 22:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
replies disabled

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