* VAX Ada sequential IO and Direct IO
@ 1987-04-09 3:32 alden
0 siblings, 0 replies; 2+ messages in thread
From: alden @ 1987-04-09 3:32 UTC (permalink / raw)
Has anyone had problems with VAX Ada sequential_io and direct_IO when
instantiated with a discriminated record type which has an unconstrained
component. I keep getting use_error raised when doing a create or open.
example
type foo(a : integer) is
record
f1 : string(1..a);
end record;
even if I restrict the range of 'a' by using a subtype of integer, or
create an integer type with a restricted range I still get a use_error.
In addition to the use error, an RMS error is listed as max record size
exceeded.
... Tony Alden
(TRW)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: VAX Ada sequential IO and Direct IO
@ 1987-04-14 1:17 gary
0 siblings, 0 replies; 2+ messages in thread
From: gary @ 1987-04-14 1:17 UTC (permalink / raw)
> Has anyone had problems with VAX Ada sequential_io and direct_IO when
> instantiated with a discriminated record type which has an unconstrained
> component. I keep getting use_error raised when doing a create or open.
>
> example
>
>
> type foo(a : integer) is
> record
> f1 : string(1..a);
> end record;
>
> even if I restrict the range of 'a' by using a subtype of integer, or
> create an integer type with a restricted range I still get a use_error.
> In addition to the use error, an RMS error is listed as max record size
> exceeded.
>
> ... Tony Alden
> (TRW)
>
>
We've been able to use sequential and direct io with discrimant
records successfully by specifying a default discriminant value,
i.e. the records have to be "constrained" at time of
instantiation of io package.
You might try something like the following:
type foo(a : integer := MAXLENGTH) is
record
f1 : string(1..a);
end record;
package rec_io is new sequential_io(foo);
Good Luck,
Gary Gafke
gary@aplpy.arpa
or seismo!mimsy!aplcen!gary
or (301) 953-6999
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1987-04-14 1:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1987-04-14 1:17 VAX Ada sequential IO and Direct IO gary
-- strict thread matches above, loose matches on Subject: below --
1987-04-09 3:32 alden
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox