comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <marin.condic.auntie.spam@pacemicro.com>
Subject: Re: Multiple entry tasks
Date: Thu, 19 Apr 2001 11:01:11 -0400
Date: 2001-04-19T15:01:13+00:00	[thread overview]
Message-ID: <9bmujp$3k2$1@nh.pace.co.uk> (raw)
In-Reply-To: pPCD6.2928$D4.287059@www.newsranger.com

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" <dennison@telepath.com> 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. :-(
>






  reply	other threads:[~2001-04-19 15:01 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-18 14:57 Multiple entry tasks Lutz Donnerhacke
2001-04-18 16:22 ` Marin David Condic
2001-04-18 18:12   ` Ted Dennison
2001-04-18 18:57     ` Ted Dennison
2001-04-18 20:16       ` Marin David Condic
2001-04-19 14:02         ` Ted Dennison
2001-04-19 14:28           ` Marin David Condic
2001-04-18 19:46     ` Marin David Condic
2001-04-19 21:52       ` Robert A Duff
2001-04-24  9:19         ` Lutz Donnerhacke
2001-04-19  8:17   ` Jean-Pierre Rosen
2001-04-19 14:42     ` Ted Dennison
2001-04-19 15:01       ` Marin David Condic [this message]
2001-04-19 15:02       ` Jean-Pierre Rosen
2001-04-19 19:12         ` Ted Dennison
2001-04-20 14:17           ` Jean-Pierre Rosen
2001-04-20 19:04             ` Ted Dennison
2001-04-23  6:55               ` Jean-Pierre Rosen
2001-04-23 13:50                 ` Ted Dennison
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox