int16, int32

John G Dobnick jgd at uwmcsd1.UUCP
Thu Aug 15 03:24:28 AEST 1985


> > Said machine is a Sperry 1100.
> On a machine like that I would guess you would have many other portability
> problems as well. How big are chars, and what character set do you use?
> -- 
> 	Peter da Silva (the mad Australian)
> 		UUCP: ...!shell!neuro1!{hyd-ptd,baylor,datafac}!peter
> 		MCI: PDASILVA; CIS: 70216,1076

The character set is ASCII.
The character size is 9 bits, packed 4 characters per word.  With ASCII, this
"wastes" 1 bit per character (assuming 8-bit characters).  The major 
*problem* this causes is the following:  you can not assume that two
adjacent characters are equivalent to a "short" (16-bit?) integer.  This is
a portability problem, in that the Sperry implementation will have this
"extra" bit between the characters.  This is also bad programming
practice.  This has also bitten us in porting "VAX-ish" C code to the
Sperry.

End hardware exposition. 

--
I think koalas are *neat* animals, but they don't *do* very much!

-- 

--
John G Dobnick
Computing Services Division @ University of Wisconsin - Milwaukee
(...ihnp4!uwmcsd1!jgd)



More information about the Comp.lang.c mailing list