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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,bd45e29f9dafca87 X-Google-Attributes: gid103376,public From: Andy Subject: Re: bitwise comparators Date: 2000/02/06 Message-ID: <389CF121.31F6@nospam.com.tj>#1/1 X-Deja-AN: 582130352 Cache-Post-Path: news.ozonline.com.au!unknown@melb-pool-170.ozonline.com.au Content-Transfer-Encoding: 7bit References: <3880D375.7E363123@hotmail.com> <38829638.0@news.pacifier.com> <3882FC1C.2BA8C959@hotmail.com> <389C4F0D.E5541B98@earthlink.net> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@connect.com.au X-Trace: perki.connect.com.au 949805812 26447 203.4.248.42 (6 Feb 2000 02:56:52 GMT) Organization: Australia On Line Pty Ltd Mime-Version: 1.0 Reply-To: andy@nospam.com.tj NNTP-Posting-Date: 6 Feb 2000 02:56:52 GMT Newsgroups: comp.lang.ada Date: 2000-02-06T02:56:52+00:00 List-Id: Ashley Deas Eachus wrote: > .... > loop > -- setup code > exit when Some_Register(Low_Order_Bit); > -- functional code > end loop; > > or if you prefer: > > -- setup code > while not Some_Register(Low_Order_Bit) > loop > -- functional code > -- setup code > end loop; > > As you can see, the exit when version is better when there is significant > setup to be done for the test--the traditional loop and a half, and the while loop > is cleaner if there is no setup required. Of course, when the setup is significant, you could always use a local procedure :-) ___________________________________________ Andy Starritt ___________________________________________