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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9869a3929132e322 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: pragma import ambiguity Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: Date: Thu, 7 Sep 2006 09:53:16 +0200 Message-ID: NNTP-Posting-Date: 07 Sep 2006 09:53:16 CEST NNTP-Posting-Host: ee909469.newsspool3.arcor-online.net X-Trace: DXC=^?gP^Kb4oO1gP]QSEBQ^d4McF=Q^Z^V384Fo<]lROoR14nDHegD_]R5ISHhjG:Xlm=DNcfSJ;bb[5FCTGGVUmh?4N\HXHJ4e80>NDKIFEP>8_7 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:6492 Date: 2006-09-07T09:53:16+02:00 List-Id: On Wed, 06 Sep 2006 13:34:27 -0400, Frank J. Lhota wrote: > tmoran@acm.org wrote: >> One Ada compiler accepts this, another doesn't. I agree with the one that >> objects. Are we wrong? >> procedure testimp is >> type logicopenm is ( clear, gl_and); >> procedure clear(mask:integer); >> pragma import(stdcall,clear,"glclear"); >> begin >> null; >> end testimp; > > Of course, one may argue that B.1 should not apply to enumeration > literals, but even so, this kind of overloading is not recommended. My > advice would be to give the enumeration literal and the procedure > separate names. procedure Testimp is procedure Clear (mask:integer); pragma Import (stdcall, clear, "glclear"); type logicopenm is (clear, gl_and); begin null; end Testimp; -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de