Article View: be.comp.programming
Article #1331Re: omzetten van integer naar char
From: Philip Paeps
Date: Wed, 25 May 2005 22:33
Date: Wed, 25 May 2005 22:33
33 lines
2023 bytes
2023 bytes
Rik <sospiri@hotmail.be> wrote:
> Kan iemand mij vertellen, wat ik verkrijg, indien ik een integer optel met
> een ASCII code caracter...
Undefined of implementation defined behaviour.
> bvb: 1 + 0x30 dit wordt weggeschreven in een karakter array.
Wat is die 1? Een int of een char? Endianness is ook nogal belangrijk.
> Kan ik dan niet gewoon 1 wegschrijven, naar het array?
strtol?
> Dit dient namelijk om het karakter 1 of 0 weg te schrijven.( ofwel 0+ 0x30
> ofwel 1+ 0x30 ).
Met welke reden?
> Kan iemand me daaromtrent uitleg geven, of goeie site? alvast bedankt....
Wat probeer je precies te forceren?
- Philip
--
Philip Paeps Please don't email any replies
philip@paeps.cx I follow the newsgroup.
BOFH Excuse #145:
Flat tire on station wagon with tapes. ("Never underestimate the
bandwidth of a station wagon full of tapes hurling down the highway"
Andrew S. Tannenbaum)
Technical Details
Message-ID:
<slrnd99v8t.m2.philip+usenet@fasolt.home.paeps.cx>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!hwmnpeer01.lga!hwmedia!hwmnpeer01.ams!nntp.telenet.be!kwabbernoot.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mailReferences:
<hpmdndIYErxoVQnfRVnytg@scarlet.biz>Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,c59addd1ec4c7578 X-Google-Attributes: gidfcea4,public X-Google-Language: DUTCH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!hwmnpeer01.lga!hwmedia!hwmnpeer01.ams!nntp.telenet.be!kwabbernoot.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail Newsgroups: be.comp.programming From: Philip Paeps <philip+usenet@paeps.cx> Subject: Re: omzetten van integer naar char References: <hpmdndIYErxoVQnfRVnytg@scarlet.biz> Organization: Happily Disorganized X-PGP-Fingerprint: FA74 3C27 91A6 79D5 F6D3 FC53 BF4B D0E6 049D B879 X-Date-in-Rome: ante diem VII Kalendas Iunias MMDCCLVIII ab Urbe Condida Message-ID: <slrnd99v8t.m2.philip+usenet@fasolt.home.paeps.cx> User-Agent: slrn/0.9.8.1 (FreeBSD) Lines: 33 Date: Wed, 25 May 2005 22:33:01 GMT NNTP-Posting-Host: 213.118.102.166 X-Complaints-To: abuse@telenet.be X-Trace: phobos.telenet-ops.be 1117060381 213.118.102.166 (Thu, 26 May 2005 00:33:01 MEST) NNTP-Posting-Date: Thu, 26 May 2005 00:33:01 MEST