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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,24d7acf9b853aac8 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!news.glorb.com!news.netfront.net!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: S-expression I/O in Ada Date: Sun, 22 Aug 2010 10:13:47 -0700 Organization: Netfront http://www.netfront.net/ Message-ID: References: <547afa6b-731e-475f-a7f2-eaefefb25861@k8g2000prh.googlegroups.com> <4c6bc259$0$6887$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: 75.211.143.2 Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: adenine.netfront.net 1282497228 53083 75.211.143.2 (22 Aug 2010 17:13:48 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Sun, 22 Aug 2010 17:13:48 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100713 Thunderbird/3.0.6 In-Reply-To: Xref: g2news1.google.com comp.lang.ada:13614 Date: 2010-08-22T10:13:47-07:00 List-Id: On 08/22/2010 03:28 AM, Simon Wright wrote: > > Unfortunately the way Ada does this is by allocating enough room for > 'object' to hold any possible size -- 2**31 bytes -- this will break > your stack! Actually, 2 ** 31 * Whatever'Size / 8 bytes. However, this is not technically true. The language does not specify how such things are stored. Some compilers (Janus Ada, for example) only use enough memory to store the current value of the object; others (GNAT, for example) allocate enough memory for the largest possible value. Of course, portable code has to work with both. -- Jeff Carter "Sheriff murdered, crops burned, stores looted, people stampeded, and cattle raped." Blazing Saddles 35 --- news://freenews.netfront.net/ - complaints: news@netfront.net ---