comp.lang.ada
 help / color / mirror / Atom feed
From: "Corey Ashford" <corey@remove.these.four.words.rational.com>
Subject: Re: record
Date: 1998/11/18
Date: 1998-11-18T00:00:00+00:00	[thread overview]
Message-ID: <72v6h1$l2b$1@usenet.rational.com> (raw)
In-Reply-To: 365270A5.13DD@usa.net


alex <cpp4@usa.net> wrote in message news:365270A5.13DD@usa.net...
>Hi I'd like to define a variable size record but I have a compile error.
>
>what can I do ?
>
> Ex; TYPE TAB   IS RECORD
>        Str :STRING(1..M);
>        Char :CHARACRER;
>        END RECORD;
>
>thank,s

One way is to add a discriminant... something
like the following:

subtype string_size is natural range 1..1024;

type tab (size : string_size) is record
    str : string (1..size);
    char : character;
end record;







      reply	other threads:[~1998-11-18  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-18  0:00 record alex
1998-11-18  0:00 ` Corey Ashford [this message]
replies disabled

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