Article View: net.lang.ada
Article #877Why is "for i in 1..2*2 loop" illegal?
From: "ANCHOR::PEARSON"
Date: Thu, 10 Jul 1986 22:50
Date: Thu, 10 Jul 1986 22:50
25 lines
1593 bytes
1593 bytes
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)
------
Technical Details
Message-ID:
<8607102356.AA28600@ucbvax.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ucbvax!LLL-ICDC.ARPA!pearson%anchor.DECnetShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site ucbvax.BERKELEY.EDU
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!ucbvax!LLL-ICDC.ARPA!pearson%anchor.DECnet
From: pearson%anchor.DECnet@LLL-ICDC.ARPA ("ANCHOR::PEARSON")
Newsgroups: net.lang.ada
Subject: Why is "for i in 1..2*2 loop" illegal?
Message-ID: <8607102356.AA28600@ucbvax.Berkeley.EDU>
Date: Thu, 10-Jul-86 18:50:00 EDT
Article-I.D.: ucbvax.8607102356.AA28600
Posted: Thu Jul 10 18:50:00 1986
Date-Received: Sat, 12-Jul-86 04:40:20 EDT
Sender: daemon@ucbvax.BERKELEY.EDU
Reply-To: "ANCHOR::PEARSON" <pearson%anchor.decnet@lll-icdc.ARPA>
Organization: The ARPA Internet
Lines: 25