Actually, it's a bit of a grey zone whether 0 (not 0.0) is in the domain of floats. This produces a run time error:
float f; int main() { f = 0; // Wrong type in assignment, expected float, got int. }
While this works and writes "darn!":
int main() { float f = 0; if (f != 0.0) werror ("darn!"); }
But I consider the second case a bug. The only reason it isn't fixed is that it's very hard to do.
Making 0.0 more equivalent with 0 would actually be a way to cover this ugliness, so in that respect it would be a good thing too.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-09-15 20:35: Subject: float type weirdness
I'd agree with that if the integer 0 was true too. But there's a difference between integer/floats and the other data types: The others have 0 in their domain too, and it's distinct from the empty values (i.e. "", ({}) etc).
/ Martin Stjernholm, Roxen IS