August 27, 2003 Problem with printf | ||||
---|---|---|---|---|
| ||||
printf seems to have a problem handling long(s) in Beta 0.69 e.g. printf("%ld, %ld\n",100L,200L); results in 100,0 Interesting enough printf("%ld,%ld,%ld\n",100L,200L); results in 100,0,200 if the values of 100 and 200 were just plain int(s) things work just fine |
August 27, 2003 Re: Problem with printf | ||||
---|---|---|---|---|
| ||||
Posted in reply to dick | you need to use %lld, since longs in D are 64-bits. %ld is DMC++'s long, i.e. 32-bits "dick" <dick_member@pathlink.com> wrote in message news:bigue4$k9n$1@digitaldaemon.com... > printf seems to have a problem handling long(s) in Beta 0.69 > e.g. > printf("%ld, %ld\n",100L,200L); > results in 100,0 > > Interesting enough > printf("%ld,%ld,%ld\n",100L,200L); > results in 100,0,200 > > if the values of 100 and 200 were just plain int(s) things work just fine > > |
Copyright © 1999-2021 by the D Language Foundation