From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fbb2432d0a728c1b X-Google-Attributes: gid103376,public From: Matthew Heaney Subject: Re: help with pointerproblem. Date: 1998/09/17 Message-ID: #1/1 X-Deja-AN: 391978177 Sender: matt@mheaney.ni.net References: <35f7f673.0@newsfeed.uu.se> <35f88e65.0@news.pacifier.com> <6ta4lf$e0b1@onews.collins.rockwell.com> <6tdhnq$3ig$1@nnrp1.dejanews.com> NNTP-Posting-Date: Thu, 17 Sep 1998 00:50:36 PDT Newsgroups: comp.lang.ada Date: 1998-09-17T00:00:00+00:00 List-Id: dewarr@my-dejanews.com writes: > It is actually quite rare to point to a descriptor (I think > that the RR compiler may have done this at least at one > point). Access objects designating unconstrained arrays in the VMS Ada compiler (circa 1990) pointed to the descriptor, which pointed to the array itself. To get around this, bindings would be written to point to a large constrained array, as in: type Character_Array is array (Natural range 0 .. 1_000_000) of Character; type String is access Character_Array; for String'Storage_Size use 0; Obviously, you don't ever designate an actual array of that size, but the representation of the access type matches that of the C code on the other side. It's up to the programmer to find the real end of the array (usually by searching for the null character, or for whatever value designates the end-of-array). The SUN compiler I'm using now implements unconstrained array access types using the thin pointer technique.