Re: sprintf basics (was: C99 IDE for windows)
arnuld said:
>
>
>
>
>
I really did not understand the most of it ;)
Then stick with snprintf.
In fact, stick with Visual Basic.
--
Richard Heathfield <http://www.cpax.org.uk >
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
arnuld said:
>On Wed, 06 Aug 2008 06:53:05 +0000, Richard Heathfield wrote:
>
>I mean it depends on the circumstances. For example, if you want to
>"sprint" three possibly-negative ints and a ten-byte string, separated
>by spaces, you know at compile time that you need
>>
> 3 * /* three */
> ((sizeof(int) * CHAR_BIT + 2) / 3) + /* ints, */
> 1) + /* possibly negative, */
> 10 + /* and a ten-byte string, */
> 3 + /* and three separating spaces,
> */
> 1 /* and a null terminator */
>"sprint" three possibly-negative ints and a ten-byte string, separated
>by spaces, you know at compile time that you need
>>
> 3 * /* three */
> ((sizeof(int) * CHAR_BIT + 2) / 3) + /* ints, */
> 1) + /* possibly negative, */
> 10 + /* and a ten-byte string, */
> 3 + /* and three separating spaces,
> */
> 1 /* and a null terminator */
>... SNIP..
>
I really did not understand the most of it ;)
In fact, stick with Visual Basic.
--
Richard Heathfield <http://www.cpax.org.uk >
Email: -http://www. +rjh@
Google users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
Comment