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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,341730abd589d6e9 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2000-11-20 22:33:12 PST Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!freenix!skynet.be!newsfeed1.funet.fi!newsfeeds.funet.fi!nntp.inet.fi!central.inet.fi!inet.fi!read2.inet.fi.POSTED!not-for-mail From: "Anders Wirzenius" Newsgroups: comp.lang.ada References: <3A16A4D5.CE941970@t-online.de> <8v90vm$j5f$1@nnrp1.deja.com> <8vbfns$do2$1@nnrp1.deja.com> Subject: Re: string operations X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: Date: Tue, 21 Nov 2000 06:30:43 GMT NNTP-Posting-Host: 194.251.142.2 X-Trace: read2.inet.fi 974788243 194.251.142.2 (Tue, 21 Nov 2000 08:30:43 EET) NNTP-Posting-Date: Tue, 21 Nov 2000 08:30:43 EET Organization: Sonera corp Internet services Xref: supernews.google.com comp.lang.ada:2310 Date: 2000-11-21T06:30:43+00:00 List-Id: "Robert Dewar" wrote in message news:8vbfns$do2$1@nnrp1.deja.com... > In article , > "Anders Wirzenius" wrote: > > To me the example would have been even more revealing if > > the Put statement had been written > > Put(Character'Val(Character'Pos ('0') + N mod 10)); > > > Odd ... addition is after all commutative, can you explain why > in this case a+b is clearer than b+a > > I personally prefer the form I had, because from an algorithmic > point of view it is N mod 10 that is important, and > the Character'Pos is a minor detail for keeping the types > right ... Ok. As i wrote, the example deals with both the algoritm of recursion and the string handling. I just emphasized the string handling more than as "a minor detail". :-) By the way. I hope miss Margit played a little with the example, as I did, and switched the order of the statements in the procedure. Anders