From: Bryon Daly <[EMAIL PROTECTED]>

On 2/10/06, The Fool <[EMAIL PROTECTED]> wrote:
>
>
> So is this right?:


It looks like it should successfully swap the byte order for you. You
should
be able to test it easily enough by writing the same number once with
the
swap and once without it into Mem.  Then print out Mem (or view in the
debugger) and see that they're reversed compared to each other.

I'm still not sure why you want to make everything big endian, though. 
Is
it just to make it easier to manipulate the individual bytes at some
later
point?  Personally, instead of swapping every value I wrote into Mem,
I'd
probably code the byte manipulation routines to handle the little
endian
order.  But that's probably more a matter of taste and your exact
application than anything else.

---
If you can't do it the hard way, you can't do it.

Most of my potential need for memoey allocation will be for bytes, but
some values are 16 bit, etc.

I like to be thourough, so I can reuse this code at any point in the
future on any progect.  Like my string class.

_______________________________________________
http://www.mccmedia.com/mailman/listinfo/brin-l

Reply via email to