[comp.sys.mac.programmer] Another ThinkC 4.0 Rookie Question

ez000453@deneb.ucdavis.edu (01/02/90)

I can hardly believe I'm having so much trouble in ThinkC 4.0. In fact, I went
back to LSC 3.02 to see if I get the same results but it wasn't particularly
wanting to do that easily. Anyway I'm having a problem getting scanf to
read in a decimal number (e.g., 0.0001) correctly. It would read in 0.1 losing
all zeros after the decimal. I believe I have all the formats straight...
      scanf("%f",my_var); with the variable, my_var declared as float. Am I
going to go crazy 'cos this is a simple thing? Nothing I'm writing is going to
work until I get this simple problem fixed. Thanks!

Maybe I should go back to Pascal?

oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo oo
o  COLIN ONG              Dept. Land, Air & Water Resources                 o
o  cgong@ucdavis.edu      University of California, Davis CA 95616          o
o  ez000453@deneb.ucdavis.edu                    FULLY DISCLAIMED!          o

siegel@endor.harvard.edu (Rich Siegel) (01/02/90)

In article <6341@ucdavis.ucdavis.edu> ez000453@deneb.ucdavis.edu () writes:

>read in a decimal number (e.g., 0.0001) correctly. It would read in 0.1 losing
>all zeros after the decimal. I believe I have all the formats straight...

	A patch was posted to comp.binaries.mac and sumex to fix this problem.


R.




~~~~~~~~~~~~~~~
 Rich Siegel
 Staff Software Developer
 Symantec Corporation, Language Products Group
 Internet: siegel@endor.harvard.edu
 UUCP: ..harvard!endor!siegel

"When someone who makes four hundred and fifty dollars an hour wants to
tell you something for free, it's a good idea to listen."

~~~~~~~~~~~~~~~