Definition of "Byte"

(no name) (llewins@ccgate.hac.com)
Wed, 25 Jun 97 14:38:20 PST8

I believe we are missing a definition for the term "byte" used various
places throughout the document. This presumably should go in the
"Semantic Terms" section. For simplicity, the definition should be
the same as that used in the ANSI C standard, to quote:

"Byte -- the unit of data storage large enough to hold any member of
the basic character set of the execution environment. It shall be
possible to express the address of each individual byte of an object
uniquely. A byte is composed of a contiguous sequence of bits, the
number of which is implementation defined..."

Without this definition, a implementor may interpret byte to mean an
8-bit quantity. This would render the following code non-portable:

size_t size;
char *buf;

MPI_Pack_size (1, MPI_INT, MPI_COMM_WORLD, &size);
buf = (char *)malloc(size);

Lloyd Lewins
Hughes Aircraft Co.
llewins@ccgate.hac.com

P.S. I note this since on my current machine (a dsp) "bytes" are 32
quantities, and sizeof(char) == sizeof(short) == sizeof(int) ==
sizeof(long) == sizeof(float) == sizeof(double) == 1!!