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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e8e240cec570cdf2 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-19 08:30:19 PST Path: supernews.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!newsfeed.planete.net!psinet-france!psiuk-f4!psiuk-p4!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: Multiple entry tasks Date: Thu, 19 Apr 2001 11:01:11 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: <9bmujp$3k2$1@nh.pace.co.uk> References: <9bkevj$61k$1@nh.pace.co.uk> <9bm76r$mf6$1@s1.read.news.oleane.net> NNTP-Posting-Host: 136.170.200.133 X-Trace: nh.pace.co.uk 987692473 3714 136.170.200.133 (19 Apr 2001 15:01:13 GMT) X-Complaints-To: newsmaster@pace.co.uk NNTP-Posting-Date: 19 Apr 2001 15:01:13 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: supernews.google.com comp.lang.ada:7006 Date: 2001-04-19T15:01:13+00:00 List-Id: Sorry. Force of habit. I generally code comparisons that avoid things like "X = 0" out of fear that one day, somehow, X may be -1 and that still means I want to take action based on nothing being there. (The 'Count attribute returns Universal Integer - so negative numbers are at least within the set - if not something that would actually get returned.) I've learned especially to avoid that comparison on floating point numbers and there is just a sort of paranoia in the back of my mind that wants to account for all possible - and impossible - conditions. (Forgive us our paranoia, for we know what we do!) So if Entry1'Count is > 0, I definitely know I've got entries called - the negation of that condition is "<=" and that accounts for everything. I suppose I could have said "not (Entry1'Count > 0)" but that may have been even more confusing! MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com Web: http://www.mcondic.com/ "Ted Dennison" wrote in message news:pPCD6.2928$D4.287059@www.newsranger.com... > In article <9bm76r$mf6$1@s1.read.news.oleane.net>, Jean-Pierre Rosen says... > I think the confusing part was that he used "<= 0" rather than "= 0". 'count > logically shouldn't ever go negative, but I guess he was trying to be safe > (perhaps there's some degenerate case about that in the LRM. I'd check it if > this were production code I was writing). I'd only expected to see a > two-character boolean of ">= 0", so that's what my brain reported. :-( >