|
 |
scott wrote:
> I don't know about you, but if I want to get a huge (>8bit) number from
> the bytes, I would do this:
HugeInt mhi = 0;
for (b = length - 1; 0 <= b; b--)
mhi = (mhi * 256) + arrayofbytes[b];
I was amused once when I posted something in the Ada forum where I wrote
something like
x = c0 * 256 + c1;
and they complimented me on having the "Ada mindset" because I didn't use a
shift operator to build the integer. I said "I do that in C also. Every
compiler can handle that these days."
--
Darren New, San Diego CA, USA (PST)
I ordered stamps from Zazzle that read "Place Stamp Here".
Post a reply to this message
|
 |