comp.lang.ada
 help / color / mirror / Atom feed
* Re: record
  1998-11-18  0:00 record alex
@ 1998-11-18  0:00 ` Corey Ashford
  0 siblings, 0 replies; 2+ messages in thread
From: Corey Ashford @ 1998-11-18  0:00 UTC (permalink / raw)



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;







^ permalink raw reply	[flat|nested] 2+ messages in thread

* record
@ 1998-11-18  0:00 alex
  1998-11-18  0:00 ` record Corey Ashford
  0 siblings, 1 reply; 2+ messages in thread
From: alex @ 1998-11-18  0:00 UTC (permalink / raw)


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




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-11-18  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-11-18  0:00 record alex
1998-11-18  0:00 ` record Corey Ashford

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