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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,54889de51045a215 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-17 08:41:09 PST Path: archiver1.google.com!news1.google.com!news2.google.com!news.maxwell.syr.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-stoc.telia.net!news-stoa.telia.net!telia.net!nntp.inet.fi!inet.fi!ash.uu.net!spool.news.uu.net!not-for-mail Date: Fri, 17 Oct 2003 11:40:26 -0400 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: += in ada References: <3F7316F7.219F@mail.ru> <17cd177c.0310010606.52da88f3@posting.google.com> <3F8BC74F.2CFBFF37@0.0> <1066312000.671303@master.nyc.kbcfp.com> <1066322883.139702@master.nyc.kbcfp.com> <3F8F372D.9040801@comcast.net> <1066400123.238640@master.nyc.kbcfp.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1066405226.728944@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@nightcrawler.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1066405226 10625 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:1084 Date: 2003-10-17T11:40:26-04:00 List-Id: Lutz Donnerhacke wrote: > Please simply do this: > procedure Mult_To_Left(target : in out Matrix; factor : in Matrix); Yes, that's what I said. >>In C++, I use these operators all the time. > > You should stick to normal programming. It's much more funny than dealing > with one syntatic element all the time. I don't understand this sentence at all. What do you mean? > So what's your point? I don't have a point, exactly. I was just pointing out that the augmented assignment operators are used very frequently in normal C++ code, and some of those uses involve those complicated left side expressions. This is real production code, not a made-up example. I think some people here believe that such an operator is a rara avis that even if available would be rarely used. > declare > fxExp : Fx_Type renames fxMap(exposure.secCurr.id.get_key); > begin > fxExp := fxExp + exposure.secExp; > end; > And now that you mention it, there's a considerable problem with the renames idiom; you must repeat the type of the thing you're renaming. > Ah! Multiple lines: > procedure Add (to: in out Fx_Type; term : in Fx_Type) is > begin > to := to + term; > end add; > > [...] > Add(to => fxMap(exposure.secCurr.id.get_key), term => exposure.secExp); > Add(fxMap(exposure.secCurr.id.get_key), exposure.secExp); > > Have fun. I would hope that you at least use a generic instantiation instead of littering your code all over the place with little bird droppings.