Subject: Re: so what's happening...
To: Lars Brinkhoff <lars.spam@nocrew.org>
From: Johnny Billquist <bqt@update.uu.se>
List: port-pdp10
Date: 07/05/2002 22:14:06
On 5 Jul 2002, Lars Brinkhoff wrote:

> Johnny Billquist <bqt@update.uu.se> writes:
> > sizeof should return storage units. That *could* mean words on a PDP-10.
> 
> Note that sizeof (char) is, by definition, 1.

Yes, but if you return the number of words required, sizeof(char) == 1,
sizeof(int) == 1 and sizeof(whatever *) == 1
Assuming we're using 7-bit characters,
sizeof("A") == 1
sizeof("AB") == 1
sizeof("ABC") == 1
sizeof("ABCD") == 1
sizeof("ABCDE") == 2

> > How does KCC do it?
> 
> sizeof (char) == 1, sizeof (int) == 4.

Right, I remember now that they always use 9-bit characters...
That's one easy way of handling things. Note though, that the value range
of a char is -256 .. 255 (I believe it's a signed value).

	Johnny

Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt@update.uu.se           ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol