packing unsigned char in PVM
camm at enhanced.com
Wed Jun 28 06:54:34 PDT 2000
Greetings! Why not pack for char, and then on the receiving end:
unsigned char *u;
kragen at pobox.com (Kragen Sitaker) writes:
> Robert Brown writes:
> > I thought char was always unsigned. Signed and unsigned differentiates
> > integers (only), or at least so I thought -- reserving the sign bit.
> > You should just pack for char, at a guess.
> In C, a char is a kind of integer, and so there is such a thing as an
> "unsigned char".
> In C, "char" can mean either "unsigned char" or "signed char",
> depending on the platform. (Unlike other kinds of integers, which are
> always signed by default.) The ANSI standard added the "signed"
> keyword so you could talk about signed chars on architectures where the
> default char was unsigned.
> Signed chars are a huge rat's nest of bugs.
> You should be able to just pack for char.
> <kragen at pobox.com> Kragen Sitaker <http://www.pobox.com/~kragen/>
> The Internet stock bubble didn't burst on 1999-11-08. Hurrah!
> The power didn't go out on 2000-01-01 either. :)
> Beowulf mailing list
> Beowulf at beowulf.org
Camm Maguire camm at enhanced.com
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
More information about the Beowulf