[comp.unix.xenix] float cast on sco xenix 2.1.3

scowles@lll-lcc.UUCP (Sid Cowles) (04/29/89)

in the following program, the cast in the first print statement does
not work correctly.  in sco 2.1.3, int's are default 2 bytes, yet the
float cast is looking at 4 bytes.  please, what did i miss?
(i included the MAXSHORT for comparison since its definition includes 
the short spec; where MAXINT is forced short (ex. 3), the cast works
fine.)
====
#include <stdio.h>
#include <values.h>
main()
{
/*1*/ fprintf(stdout,"(float)MAXINT: %f\n",(float)MAXINT);
/*2*/ fprintf(stdout,"(float)MAXSHORT: %f\n",(float)MAXSHORT);
/*3*/ fprintf(stdout,"(float)(short)MAXINT: %f\n",(float)(short)MAXINT);
}
====
thanks,
sid
=======================================================================
s cowles
uucp:      {backbone}!lll-lcc!scowles
internet:  scowles@lll-lcc.llnl.gov
=======================================================================