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-Thread: 103376,c1400b61b3f80c1e X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!p25g2000hsf.googlegroups.com!not-for-mail From: gpriv@axonx.com Newsgroups: comp.lang.ada Subject: Re: Are there noticable differences in Ada acceptance by country? Date: Fri, 21 Mar 2008 12:15:53 -0700 (PDT) Organization: http://groups.google.com Message-ID: <9878eb3d-2aec-4150-9b12-b652669def2c@p25g2000hsf.googlegroups.com> References: <87d4pr6413.fsf@ludovic-brenta.org> <47e0fc15$0$89167$157c6196@dreader1.cybercity.dk> <13u2t1a2s141531@corp.supernews.com> <1fac7b25-a11f-4199-97ad-45688318e424@u69g2000hse.googlegroups.com> <1kv438li1fcvq.ox99qnglkog5.dlg@40tude.net> <9adb8bbd-5058-4406-b8b9-2ccfbc141264@u72g2000hsf.googlegroups.com> NNTP-Posting-Host: 151.196.71.114 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1206126953 28457 127.0.0.1 (21 Mar 2008 19:15:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 21 Mar 2008 19:15:53 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: p25g2000hsf.googlegroups.com; posting-host=151.196.71.114; posting-account=YaY8rAoAAAAAnFXOECY3BGVJsrvFJCgy User-Agent: G2/1.0 X-HTTP-Via: 1.1 SPARKS X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12,gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:20537 Date: 2008-03-21T12:15:53-07:00 List-Id: On Mar 21, 12:16 am, "Jeffrey R. Carter" wrote: > gp...@axonx.com wrote: > > > From my own C experience: using code from different sources X and Y > > coordinates in function calls were in different order: foo(x,y); > > boo(height, width), etc. Easy to overlook. > > Which is why we don't use C: But sometimes we have no choice, unfortunately :-( For C++ I come up with macros NEWTYPE(TypName,BaseType) and SUBTYPE(TypeName,BaseType) that generate structure-envelopes with all basic arithmetic overloads that somewhat mimics Ada typing functionality. NEWTYPE(X_Coord, float); NEWTYPE(Y_Coord, float); void Foo(X_Coord x, Y_Coord y); > > Foo (X => X, Y => Y); > Boo (Width => X, Height => Y); > > -- > Jeff Carter > "C++: The power, elegance and simplicity of a hand grenade." > Ole-Hjalmar Kristensen > 90