Help with BDSC float

karl at haddock karl at haddock
Fri Sep 19 09:33:00 AEST 1986

mit-eddie!moore (Andrew Moore) writes:
>My BDS C compiler doesn't want to accept  %6.3f  (example) in printf's.
>Nor does it accept "float" as a data type declaration.  On some compilers,
>I don't have to declare a variable as "float" before using it:
>    printf("Float: %6.3f", (5.0/4.0));

I don't understand your last sentence.  Declare what variable?  I presume
you mean that on some compilers, you can write floating-point expressions
without the keyword "float".

>...but in BDS, this is not accepted.  How is "float" different in BDS C?

The most likely answer is simply that you have a compiler that doesn't
support floating point.  (I presume "double" doesn't work either?)  Talk to
your vendor.

Karl W. Z. Heuer (ima!haddock!karl or karl at, The Walking Lint

More information about the Comp.lang.c mailing list