[Nickle]Indeed, it's a bug
(Re: scanf can't scan negitive numbers?)
Barton C Massey
bart@cs.pdx.edu
Mon, 02 Jul 2001 11:31:12 -0700
It's a (somewhat embarassing) bug: string_to_real() was
checking for the sign at the beginning, but forgetting to
put it back at the end. Fixed in current CVS: thanks much
for the report!
If anyone wanted to write a test suite for Nickle...
Bart
In message <20010702164659.89018.qmail@web13906.mail.yahoo.com> you wrote:
> Greetings,
>
> I don't know if this is a bug (or am I missing something).
> The following nickle code won't take a negitive number:
>
> printf("type in negitive number:\n");
> real negNum;
> scanf("%f", &negNum);
> printf("your number is %f\n", negNum);
>
> Thanks for any help,
>
> Craig
>
>
> =====
>
> ---------------------------------
>
> Craig Dawson at cxd@CraigDawson.org
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
> _______________________________________________
> Nickle mailing list
> Nickle@keithp.com
> http://keithp.com/mailman/listinfo/nickle