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.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,45b47ecb995e7a3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-08-13 14:47:25 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <3B6F1B2F.4FC3C833@gsde.hou.us.ray.com> <5ee5b646.0108071819.6e84e33d@posting.google.com> <3_Xc7.45$NM5.84779@news.pacbell.net> Subject: Re: Ada Idioms Progress Preview Message-ID: X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Mon, 13 Aug 2001 17:47:11 EDT Organization: http://www.newsranger.com Date: Mon, 13 Aug 2001 21:47:11 GMT Xref: archiver1.google.com comp.lang.ada:11878 Date: 2001-08-13T21:47:11+00:00 List-Id: In article , Ole-Hjalmar Kristensen says... >One thing which can be said in favour of having a terminator character >is that it frees you from having to store the length explicitly. The >length of a string is usually different from the size of the array >used to store the string. It frees you from that problem in *some* cases. I find that most of the time I don't change the string, so I can declare it perfectly sized. When you do that, you are not storing the length explicitly, but rather implicitly in the array bounds. As others have mentioned, you also don't have to iterate through every valid data element to derive this piece of implicit information like you do with C. Thus perfectly-sized Ada strings give you the best of both worlds. Unfortunately, the most notable exception to this is in reading data from Text_IO, which is also one of the first things a newbie will want to do with Ada strings. :-( --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com