Float problems

Marc WANDSCHNEIDER storm at cs.mcgill.ca
Sun May 26 07:33:01 AEST 1991


[ANSI C stuff]

Why does the following:

#include<stdio.h>

float testfloat (void);

void main(void)
{
	float f;

	f = testfloat;

	printf("%7.3f\n", f);
}

float testfloat (void)
{
	return 1.234;
}

Give me an ILLEGAL USE OF FLOATING POINT error...?

./*-

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
storm at cs.mcgill.ca         McGill University           It's 11pm, do YOU
Marc Wandschneider         Montreal, CANADA            know what time it is?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the Comp.lang.c mailing list