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,9dec3ff1604723d9 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news2.telebyte.nl!news-fra1.dfn.de!newsfeed.hanau.net!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.de!t-online.de!news.t-online.com!not-for-mail From: Alfred Hilscher Newsgroups: comp.lang.ada Subject: Re: Bitordering? was Re: Bitmanipulation in Ada Date: Mon, 23 Aug 2004 20:47:10 +0200 Organization: T-Online Message-ID: <412A3BAE.CE8EC07B@alfred-hilscher.de> References: <412665C4.E52A7590@alfred-hilscher.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.t-online.com 1093287208 06 10309 YXlYXlc6I6Kg-DP 040823 18:53:28 X-Complaints-To: usenet-abuse@t-online.de X-ID: SInbm+ZrQeifRbVS-+2UhNnm-F6jDIzWguy4Zi2q8DTgoJlsqkJl6p X-Mailer: Mozilla 4.75 [de] (WinNT; U) X-Accept-Language: de Xref: g2news1.google.com comp.lang.ada:2938 Date: 2004-08-23T20:47:10+02:00 List-Id: Nick Roberts schrieb: > > On Fri, 20 Aug 2004 22:57:40 +0200, Alfred Hilscher > wrote: > > ... > > Does this help you? Yes it does. Although it is not what I expected. My first idea was something like this: type flags is (buffer_empty, overrun, parity_error, frame_error, timed_out, break_detected, receiving, idle); type port is array (flags) of boolean; pragma pack (port); status_port : port; for port use at 16#0004#; ... for s in overrun .. break_detected loop if status_port (s) then return flags'pos (s); end if; end loop; return 0; So instead I have to write: type port is record buffer_empty : boolean; ... end record; ... if status_port (overrun) then return 7; elsif status_port (parity_error) then return 6; ... else return 0; end if; Is this correct? Ok, it is a bit more to write, but this should not matter. Regards, Alfred ----------------------------------------------------- To send me mail, please replace "Spam" by "Jedermann" -----------------------------------------------------