From: tore@lis.pitt.edu (Tore Joergensen)
Subject: ada.sequential_io problem
Date: 14 Mar 1995 06:44:50 GMT
Date: 1995-03-14T06:44:50+00:00 [thread overview]
Message-ID: <3k3e12$2op@toads.pgh.pa.us> (raw)
What is wrong???
I tried to define:
package bio is new ada.sequential_io(unsigned_8);
Unsigned_8 is defined in the package interfaces as:
type unsigned_8 is mod 2 ** 8;
for unsigned_8'size use 8;
When I try to compile (gnat 2.03 for OS/2), I get:
f:\EMX\GNATLIB\a-sequio.adb:33:59: actual for "Element_Type"
must be a definite subtype
LRM 3.5.4 (10):
"... A modular_type_definition also defines a constrained first subtype
of the type with a range that is the same as the base range of the type."
LRM 3.3 (23):
"... A subtype is an indefinite subtype if it is an unconstrained array
subtype, or if it has unknown discriminants or unconstrained discriminants
without defaults (see 3.7); otherwise the subtype is a definite subtype
(all elementary subtypes are definite subtypes). ..."
I can't figure out what is wrong with my package-definition. I even tried
to make it with integer (the rationale (part2.II.11) says that integer is
a definite type)
package bio is new ada.sequential_io(integer);
but I got the same error. Can the problem be that the sequential_io package
uses storage_io where the Element_type is defined as private, while the
sequential_io defines Element_type(<>) as private? If this is the problem,
doesn't that mean that sequential_io will never work?
Any help will be appreciated!
--
______________________________________________________________________
Tore B. Joergensen, | e-mail: tore@lis.pitt.edu
a norwegian student | snail-mail: 2201 Pittockstr.
a long way from home. | Pittsburgh, 15217 PA
| web: http://www.pitt.edu/~tojst1
next reply other threads:[~1995-03-14 6:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-03-14 6:44 Tore Joergensen [this message]
1995-03-14 14:01 ` ada.sequential_io problem Robert A Duff
1995-03-15 11:00 ` Pascal OBRY
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox