Casting NULL again

Peter at adm.UUCP Peter at adm.UUCP
Tue Jan 27 23:08:42 AEST 1987


Thanks for your comments on this matter. Unfortunately, most
of you misunderstood what I wanted. I realize that under some
machines ints are 16 bits and pointers are 32. I have a MAC and
thats the case there and I often have to pass parameters as
(long)NULL to get the right number of bytes passed. That's
nothing to do with pointers per se,=that's a "problem" of
dealing with long int parameters. I also realize that C has
been implemented on word architectures such as the DEC-20 which
has 36-bits per location. In such a machine the representation
of a char pointer is certainly different that other types of
pointers if packing of chars is wanted. I've programmed in C
on the VAX/Unix, MS-DOS (Lattice-C, MicroSoft-C) and the Macintosh
(Megamax C, Aztec-C, LightspeedC). If all the systems I've used
(which are byte-oriented of course), the size of a pointer to
char is always the same as the size of a pointer to integer or double
or struct or whatever (with the exception that under microsoft C you
can have pointers and "far" pointers, but that's because of the
80x86's quirky addressing scheme). My question is what byte-oriented
machines out there have pointers to data that are different sizes
I really just wanted some specific examples (machines/pointer sizes).
That's all.

Peter at Acadia.BITNET



More information about the Comp.lang.c mailing list