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=unavailable autolearn_force=no version=3.4.4 Path: backlog3.nntp.dca1.giganews.com!buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!news.etla.org!aioe.org!.POSTED!not-for-mail From: Victor Porton Newsgroups: comp.lang.ada Subject: Re: Interfacing enums with C Date: Sun, 17 Aug 2014 22:46:34 +0300 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: AnnUDmZwVERVUXyHDyOl5A.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Complaints-To: abuse@aioe.org User-Agent: KNode/4.12.4 X-Notice: Filtered by postfilter v. 0.8.2 Xref: number.nntp.dca.giganews.com comp.lang.ada:188526 Date: 2014-08-17T22:46:34+03:00 List-Id: Simon Wright wrote: > Victor Porton writes: > >> type Option_Type is (A, B); >> for Option_Type'Size use Interfaces.C.unsigned'Size; >> for Option_Type use (A=>1, B=>2); > > What's wrong with > > type Option_Type is (A, B) > with Convention => C; > for Option_Type use (A => 1, B => 2); http://www.ada-auth.org/standards/12rm/html/RM-B-1.html 14/3 - 18 does not say that enumeration types are eligible for convention C. So, in my opinion, RM does not require the following code to be compilable: type Option_Type is (A, B) with Convention => C; > And your first interfacing convention is much better. IMO. -- Victor Porton - http://portonvictor.org