comp.lang.ada
 help / color / mirror / Atom feed
* Implementation of unconstrained arrays in records
@ 1986-06-26 16:57 Joe Orost
  0 siblings, 0 replies; only message in thread
From: Joe Orost @ 1986-06-26 16:57 UTC (permalink / raw)


<>
I am interested in how Ada compilers implement the following Ada construct:

   PROCEDURE unc IS
	TYPE var_string(length : integer) IS RECORD
           component : string(1..length);
        END RECORD;
        a : var_string(10);
        FUNCTION b RETURN var_string;
        c : CONSTANT var_string := b;
        FUNCTION b RETURN var_string IS
        BEGIN
           RETURN a;
        END b;
   BEGIN
      NULL;
   END unc;

Our compiler attempts to implement the record with maximal size, which is 2
Giga-bits.  Failing that, it gives a warning and restricts the string to
1024 elements.  Each object of the record type is allocated with size
1024*character'size+integer'size.

How does the Ada compiler YOU are using implement this?

Send MAIL and I will summarize to the net.

				regards,
				joe

--

 Full-Name:  Joseph M. Orost
 UUCP:       ihnp4!vax135!petsd!joe
 ARPA:	     vax135!petsd!joe@BERKELEY
 Phone:      (201) 758-7284
 Location:   40 19'49" N / 74 04'37" W
 US Mail:    MS 313; Concurrent Computer Corporation; 106 Apple St
             Tinton Falls, NJ 07724

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1986-06-26 16:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1986-06-26 16:57 Implementation of unconstrained arrays in records Joe Orost

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