packing unsigned char in PVM

Camm Maguire camm at
Wed Jun 28 06:54:34 PDT 2000

Greetings!  Why not pack for char, and then on the receiving end:

	unsigned char *u;

	(read u[i])

Take care,

kragen at (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>       Kragen Sitaker     <>
> The Internet stock bubble didn't burst on 1999-11-08.  Hurrah!
> <URL:>
> The power didn't go out on 2000-01-01 either.  :)
> _______________________________________________
> Beowulf mailing list
> Beowulf at

Camm Maguire			     			camm at
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

More information about the Beowulf mailing list