[comp.sys.cbm] C programming data sizes on the C64

czei@accelerator.eng.ohio-state.edu (Michael S. Czeiszperger) (06/21/88)

I was thinking about porting a C program to my C64, and was
wondering what the data sizes would be.  How many bytes are
the long, short, and int variables?

Thanks,


-- 
Michael S. Czeiszperger         | "The only good composer is a dead composer"
Systems Analyst                 | Snail: 2015 Neil Avenue         (614)
The Ohio State University       |        Columbus, OH 43210          292-
ARPA:czei@accelerator.eng.ohio-state.edu  PAN:CZEI                     0161

rob@selenium.cchem.berkeley.edu (Robert Oyung) (06/22/88)

In article <310@accelerator.eng.ohio-state.edu> czei@accelerator.eng.ohio-state.edu (Michael S. Czeiszperger) writes:
>I was thinking about porting a C program to my C64, and was
>wondering what the data sizes would be.  How many bytes are
>the long, short, and int variables?
>
The two major C compilers for the C64 and C128 are "Power C" by Spinnaker 
and "Super C" by Abacus.  Most people have the "Power C" compiler.  I have 
the "Super C" compiler and can tell you the specs for its data types.

	 short        2 bytes  -32768 to +32767
	 int          2 bytes  same as above
	 long         4 bytes  -2147483648 to 2147483647
	 float        4 bytes  +/- 9.09E-77 to +/- 6.78E+74
						   accurate to 6 or 7 places
	 long float   8 bytes  same as above
                           accurate to 16 places

----------------------------------------------------------------------------
Robert Oyung                         rob@selenium.cchem.berkeley.edu
27 Longview Court
San Francisco, CA 94131