Talk About Network



Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Icon > A bug in printf
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 161 of 181
Post > Topic >>

A bug in printf

by Cheyenne Wills <cwills@[EMAIL PROTECTED] > Sep 6, 2007 at 12:45 PM

I found a little bug hidden in the printf function in the IPL.  It drops 
leading zeros to the right of the decimal point. 

The following code illustrates the problem
----[printfbug.icn]----
link printf
procedure main()
   a := 0.00114
   printf("%.4r\n",a)
   a := 0.00115
   printf("%.4r\n",a)
end
----[eof]----

running it produces -> 

0.0011
0.1200

----

I will work up a fix this evening when I get back home.

Cheyenne Wills




 2 Posts in Topic:
A bug in printf
Cheyenne Wills <cwills  2007-09-06 12:45:15 
Re: A bug in printf
Cheyenne Wills <cwills  2007-09-06 16:03:37 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu May 15 0:55:59 CDT 2008.