From: erik quanstrom <quanstro@quanstro.net>
To: comeau@comeaucomputing.com, 9fans@9fans.net
Subject: Re: [9fans] binary sprint format
Date: Fri, 7 Aug 2009 08:52:03 -0400 [thread overview]
Message-ID: <bc56a3b51f1bab6f137fa07b367f508d@quanstro.net> (raw)
In-Reply-To: <h5fs8c$sel$1@panix1.panix.com>
On Fri Aug 7 04:44:37 EDT 2009, comeau@panix.com wrote:
> In article <4A7B6EF7.6090305@tecmav.com>,
> Adriano Verardo <a.verardo@tecmav.com> wrote:
> >I'm trying to convert integers in text binary format by sprint(...,
> >"%b", i),
> >but 8c issue a "format mismatch b INT" warning message.
> >
> >Can anyone kindly explain to me my mistake ?
> >Doesn't "%b" behave like the other integer format specifications ?
>
> Sound like you may want %d, however, not sure what you're trying
> to do, since dunno what you mean by text binary or if you were just
> cutting corners with ... but run "man sprintf" and have a look.
if only the man page had been read and corners had not been cut ...
here's what was missed:
- the message (http://9fans.net/archive/2009/08/191) explaining
the solution which was sent several hrs earlier,
- that he was using sprint, not sprintf from stdio,
- that %b is a legitimate sprint verb.
- erik
next prev parent reply other threads:[~2009-08-07 12:52 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-07 0:01 Adriano Verardo
2009-08-07 0:08 ` erik quanstrom
2009-08-07 0:30 ` Adriano Verardo
2009-08-07 0:34 ` erik quanstrom
2009-08-07 1:27 ` Adriano Verardo
2009-08-07 8:37 ` kjs
2009-08-07 8:37 ` Greg Comeau
2009-08-07 12:52 ` erik quanstrom [this message]
2009-08-07 2:15 Akshat Kumar
[not found] <634008374f96d39b2953843bc63d67ff@plan9.bell-labs.com>
2009-08-07 3:47 ` Adriano Verardo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bc56a3b51f1bab6f137fa07b367f508d@quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@9fans.net \
--cc=comeau@comeaucomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).