🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #3666

Re: binary string als int afdrukken in C

#3666
From: Arnold Hendriks
Date: Sat, 29 Nov 2003 16:33
15 lines
1616 bytes
"staf wagemakers" <staf_nospam_@patat.org> wrote in message
news:slrnbshhuh.3sc.staf_nospam_@localhost.staflaptop...
> On 2003-11-29, Gunter Schelfhout <nospam@please.com> wrote:
> > Hoe kan een string (bv "1100100101001001") afdrukken als een int in C
met
> > behulp van de functies in glibc?
> > Met printf?
>
> er bestaat hievoor geen standaard functie voor in libc
> ...of ik ken hem niet ;-)
Dat laatste vrees ik :-)

De functies strtol/strtoul accepteren een 'base' parameter, die in het
gebied 2 (binair) t/m 36 mag liggen.
Technical Details
Message-ID: <bqaho7$tou$1@netlx020.civ.utwente.nl>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!surfnet.nl!news.utwente.nl!not-for-mail
References: <td1yb.50435$xX1.1629315@phobos.telenet-ops.be> <slrnbshhuh.3sc.staf_nospam_@localhost.staflaptop>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fcea4,12763d3d6faef1bf
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2003-11-29 08:33:12 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!surfnet.nl!news.utwente.nl!not-for-mail
From: "Arnold Hendriks" <a.hendriks@b-lex.nl>
Newsgroups: be.comp.programming
Subject: Re: binary string als int afdrukken in C
Date: Sat, 29 Nov 2003 17:33:11 +0100
Organization: University of Twente, Enschede, The Netherlands
Lines: 17
Message-ID: <bqaho7$tou$1@netlx020.civ.utwente.nl>
References: <td1yb.50435$xX1.1629315@phobos.telenet-ops.be> <slrnbshhuh.3sc.staf_nospam_@localhost.staflaptop>
NNTP-Posting-Host: jeltsin.student.utwente.nl
X-Trace: netlx020.civ.utwente.nl 1070123591 30494 130.89.163.169 (29 Nov 2003 16:33:11 GMT)
X-Complaints-To: abuse@utwente.nl
NNTP-Posting-Date: Sat, 29 Nov 2003 16:33:11 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165