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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.149.67 with SMTP id ty3mr1500631pab.27.1390949513329; Tue, 28 Jan 2014 14:51:53 -0800 (PST) X-Received: by 10.50.43.194 with SMTP id y2mr80245igl.6.1390949513041; Tue, 28 Jan 2014 14:51:53 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.lightlink.com!rahul.net!wasp.rahul.net!rahul.net!news.ripco.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!c10no4447415igq.0!news-out.google.com!wo6ni17igb.0!nntp.google.com!c10no4447405igq.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 28 Jan 2014 14:51:52 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=97.117.192.167; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG NNTP-Posting-Host: 97.117.192.167 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: need help learning Ada for a modula-2 programmer From: Jerry Injection-Date: Tue, 28 Jan 2014 22:51:53 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2138 X-Received-Body-CRC: 3327080341 Xref: news.eternal-september.org comp.lang.ada:18308 Date: 2014-01-28T14:51:52-08:00 List-Id: On Monday, January 27, 2014 6:06:43 PM UTC-7, ag...@drrob1.com wrote: The way that I came to terms with Ada strings (coming from Pascal) was to f= irst, learn about the three different kinds of strings; second, pretty much= forget what I knew about Pascal strings; third, realize that most of the b= uilt-in Ada functions require a fixed-length string as arguments; fourth, w= ork with mostly unbounded strings until it is necessary to pass them to a f= unction, at which time use To_String (and To_Unbounded when going in the ot= her direction); and finally, write all your own subprograms so that they to= o use fixed-length strings. I rarely or never use Pascal-style strings whic= h are most closely mimiced in Ada by bounded-length strings. When I started Ada, learning about strings and subtypes were the two most i= mportant concepts that got me writing basic code effectively. (I could add,= Ada's most excellent approach to variable-length arrays.) Jerry