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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1ff5003422436e4 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-11-01 18:33:07 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!xlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!news.mathworks.com!noc.near.net!inmet!dsd!bobduff From: bobduff@dsd.camb.inmet.com (Bob Duff) Subject: Re: Easily-Read C++? Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. References: <38k8g2INNiff@marble.summit.novell.com> Date: Wed, 2 Nov 1994 00:46:15 GMT Date: 1994-11-02T00:46:15+00:00 List-Id: In article , Adam Beneschan wrote: >I suppose that your suggestion will work if the *only* operation you >perform on a dynamic one-dimensional array is indexing, but quite >frankly I can't imagine anyone wanting to write a routine that takes a >dynamic array, uses only indexing, and doesn't use 'FIRST, 'LAST, or >'RANGE (or pass the array on to another routine that does). Yes, you are correct. It is interesting to think about when a compiler could store just, say, the address of the first element and the length (and calculate everything else from that). Super-null arrays cause trouble: X: String(100 .. -12345); The length is zero, but Ada requires one to remember the actual bounds, at least in some circumstances. >Also, it should be noted that your suggestion won't work on dynamic >two-dimensional or higher-dimensional arrays. Correct. In the multi-dimensional case, the indexing calculation depends on the size of the lower dimensions. - Bob -- Bob Duff bobduff@inmet.com Oak Tree Software, Inc. Ada 9X Mapping/Revision Team (Intermetrics, Inc.)