[comp.sys.atari.st] passing shorts and longs

braner@batcomputer.tn.cornell.edu (braner) (05/09/87)

[]

K&R does _NOT_ promise that all ints are passed as 4 bytes.  All they said
was that char and short are passed as int, and that int is the "natural size"
for the machine (16 bits for the 68000, in my view).  Longs may be longer
than ints.  Under both MWC and Megamax, ints are 16 bits and longs are 32.

BTW: in Megamax, if d is 'double', you have to use "scanf("%lf", &d)"
(not "%f").   On the other hand, if f is 'float', you _can_ use
"printf("%lf", f)"---as well as "printf("%f", d)"!  That's because
floats are passed as doubles, but pointers are just pointers so that
scanf() cannot tell what it's got.

- Moshe Braner