From: Rich Chiavaroli (rchiav@FRONTIERNET.NET)
Date: 10/07/97

Just a short question here about floats with ANSI C on AIX.

This is an example of something I was trying to do.

float a;

a = 10 / 100;

'a' always comes back as 0. I've found a workaround for it but I was
just curious if floats have to have a whole number part or if I was just
doing something wrong. The formula was more complex but it would have
produced a number between 0.01 and 0.99. On paper it should have anyway.
But as soon as I divided by 100, the var became 0. I'm also curious if
it can't be done like this, how is it supposed to be done...


     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |

This archive was generated by hypermail 2b30 : 12/08/00 PST