On Sun, 14 Jun 1998, Bryan Scaringe wrote: >NO! Bad Karl!! Bad! > >Floats and doubles are defined using the decimal place. This only metter in calculus. >1.0 > >however, C/C++ will assume floating point literals (such as 1.0) >to be of type double, unless followed by an 'f' (1.0f). > >If you leave out the f, it is no real problem. The 1.0 will be >cast to type 'float' before assignment. What' s the difference? You could write also: void main(void) { float r = '0'; printf("%f\n", r); } And '0' will be casted to float and it will print 48.000... as expected. Andrea[s] Arcangeli
- -ffloat-store bug in all version of gcc - needed help ... Andrea Arcangeli
- Re: -ffloat-store bug in all version of gcc - nee... Glynn Clements
- Re: -ffloat-store bug in all version of gcc -... Andrea Arcangeli
- Re: -ffloat-store bug in all version of g... Glynn Clements
- Re: -ffloat-store bug in all version of gcc -... MCENANEY WILLIAM J
- Re: -ffloat-store bug in all version of g... Glynn Clements
- Re: -ffloat-store bug in all version ... Andrea Arcangeli
- Re: -ffloat-store bug in all version of g... Karl F. Larsen
- Re: -ffloat-store bug in all version of gcc - nee... Bryan Scaringe
- Re: -ffloat-store bug in all version of gcc -... Andrea Arcangeli
- Re: -ffloat-store bug in all version of g... Karl F. Larsen
- Re: -ffloat-store bug in all version of gcc -... Karl F. Larsen
- Re: -ffloat-store bug in all version of gcc - nee... Nabil EL ANDALOUSSI