[Date Prev][Date Next][Thread Prev][Thread Next][Author Index][Date Index][Thread Index]

RE>Re- Signed/Unsigned con



Reply to:   RE>Re:  Signed/Unsigned confus
I keep forgetting that.  Who has exception handlers? (us, of course)

However, the correct fix in this case is not to blast, but to return the
last valid index checked.  This is enough information and is the correct
information to return. (it makes sure that lowWaterMark >= highWaterMark)

--------------------------------------
Date: 9/13/90
To: heh 
From: michael@xxxxxxxxxxx
Received: by xanadu.com; 13 Sep 90 20:53:42
Received: by xanadu  (4.1/SMI-4.0.2) id AA28801; Thu, 13 Sep 90 20:47:30 PDT
Date: Thu, 13 Sep 90 20:47:30 PDT
From: michael@xxxxxxxxxxx (Michael McClary)
Message-Id: <9009140347.AA28801@xanadu >
To: vlad!mark, xtech
Subject: Re:  Signed/Unsigned confusion

> ActualIntegerTable::firstElemAfter and
> ActualIntegerTable::lastElemBefore are both declared as returning a
> UInt4, but both (if the tally == UInt40) will try to return a -1.
> What's the right fix?

BLAST()

Which is the generic answer to "How do I return an exception when every
member of the set of possible return values is a valid non-exceptional
result?"

Magic numbers are for people who don't have an exception-handler.

	michael