comp.lang.ada
 help / color / mirror / Atom feed
From: bernhardm@aol.com (BernhardM)
Subject: Derived type declartion questions
Date: 2 Nov 1994 20:37:06 -0500
Date: 1994-11-02T20:37:06-05:00	[thread overview]
Message-ID: <399es2$6p2@newsbf01.news.aol.com> (raw)

PACKAGE numeric_base_types IS
 TYPE integers IS NEW integer;
end numeric_base_types;

WITH numeric_base_types;
PACKAGE numeric_types IS
   TYPE int30s IS NEW numeric_base_types.integers
      RANGE 0 .. 2**30-1;
END numeric_types;

Our interpretation of LRM 4.6(15) (first paragraph 15) is that the
upper bound of the above range constraint is illegal, since the
operators "**" and "-" for integers are not visible within the package
numeric_types. LRM 3.5.4(8) references LRM 4.6.

Is this a correct interpretation of the 1983 LRM ?

The June 94 Ada 9X Reference Manual 3.5 has been reworded. 3.5 (5)
states "For a range of a given type, the simple_expressions of the
range (likewise, the simple_expressions of the equivalent range for a
range_attribute_reference) are expected to be of the type of the
range."

What does "expected" mean ? Specifically, what is the action required
of a compiler if the expectation is not met ?

Furthermore, 3.5 (9) states "If simple_expressions are given to
specify bounds, the evaluation of the range evaluates these simple
expressions in an arbitrary order, and converts them to the type of
the range."

If we assume that the "simple_expressions of the range" mentioned in
3.5 (5) are the same as the "simple_expressions given to specify bounds",
then it seems to us that paragraphs 3.5 (5) and 3.5 (9) are contradictory.

This is based on the further assumption "expected" means "shall" or
"must".

What is the intended meaning of these paragraphs ?

Bruce Gayliard     rusty@tinton.ccur.com
Bernhard Mulder    bm@tinton.ccur.com



             reply	other threads:[~1994-11-03  1:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-11-03  1:37 BernhardM [this message]
1994-11-03 14:47 ` Derived type declartion questions Tucker Taft
replies disabled

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