Integer>>highByte ambiguous?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Integer>>highByte ambiguous?

Schwab,Wilhelm K
Hello all,

If you have nothing better to do, take a look at #highByte.  A quick
glance leaves me to think it looks at the receiver's value, and as such
might answer an ambiguous value rather than taking the high byte of a
fixed-size integer as one might expect.  I am wondering whether there
might be examples of "large and small" small integers that answer the
same #highByte, when one would "reasonably" expect the smaller to have
zero for its high byte.

One might summarize the above as asking whether Integer should even try
to define #highByte.  Should it be left to DWORD, etc.?

Have a good one,

Bill

--
Wilhelm K. Schwab, Ph.D.
[hidden email]


Reply | Threaded
Open this post in threaded view
|

Re: Integer>>highByte ambiguous?

Ian Bartholomew-19
Bill,

> One might summarize the above as asking whether Integer should even try to
> define #highByte.  Should it be left to DWORD, etc.?

I imagine the defence would make quite a thing of the fact that it is
defined as "private" :-)

I agree though, the name is misleading, especially as it /seems/ to be a
sibling to #highWord and could easily be seen as the 8 bit version of that
method. Perhaps #mostSignificantByte would be a better selector.

--
Ian

Use the Reply-To address to contact me.
Mail sent to the From address is ignored.