Assinging values to type float

Peter Knight prk at planet.bt.co.uk
Wed Aug 29 18:03:35 AEST 1990


RHMCSUPV at MIAMIU.BITNET (Douglas M. MacFarlane) writes:

>Excuse the novice question . . .
> 
>I'm new to C and liking it, but this puzzles me.  I'm using Microsoft
>C ver 5.1.   When I assign a value to a float variable, I get a data-
>conversion warning (with warning level 2 set).  Why?
> 
>For example:
> 
>float fValue ;     /* define fValue as a floating point variable  */
> 
>other lines
> 
>fValue = 35 ;     /* produces a Data Conversion warning at compile time */
          ^^  This is an integer constant, as it does not
		of the form   35.0, 35e0 or 3.5e1, etc, which are
		floating point (actually double) constants.

Peter Knight
BT Research

#include <std.disclaimer>



More information about the Comp.lang.c mailing list