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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a5aa52a6f866183 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-27 21:15:44 PST Path: nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!swiss.ans.net!solaris.cc.vt.edu!news.mathworks.com!news2.near.net!news.delphi.com!usenet From: tmoran@bix.com Newsgroups: comp.lang.ada Subject: Re: Flags in Ada? Date: 28 Oct 1994 03:59:17 GMT Organization: Delphi Internet Services Corporation Message-ID: <38psul$nsb@news.delphi.com> NNTP-Posting-Host: bix.com Date: 1994-10-28T03:59:17+00:00 List-Id: Some downsides of using 9X modular types: Console.Control := Start_Read_Bit; may look correct, but perhaps what you really wanted was Console.Control := Console.Control or Start_Read_Bit; Using records, those two are done with less ambiguity with Console.Control := Start_Read_OP_Code; Console.Control.Start_Read := True; >... a measure of safety. The compiler will complain if you >use a Status_Byte mask on the Control register, or vice-versa. But Console.Control := Console.Control*3; is legal, though perhaps not what you meant to code. And there is a temptation to do arithmetic (shift, for instance) to accomplish things. In some circumstances that's fine, and even a good reason to use modular types rather than records, but it clearly locks you into a certain bit representation. There are plenty of programmers in the world who will do 'clever' arithmetic to juggle bits. :(