Article View: fr.comp.lang.c
Article #15251Re: rot13 [Was : Re: conjugaison et autres ...]
From: Richard Delorme
Date: Mon, 03 Oct 2005 08:30
Date: Mon, 03 Oct 2005 08:30
27 lines
2583 bytes
2583 bytes
Harpo a �crit : > Charlie Gordon wrote: > > >>le cast en (int) de alphabet[i] est inutile, il ne fait rien du tout, >>de plus alphabet[i] est forc�ment positif, donc inutile de caster en >>(unsigned char). > > > C'est vrai en ASCII, pas en EBCDIC. alphabet[i] est n�cessairement positif car il utilise des caract�res du "basic execution character set". 6.2.5 [#3] An object declared as type char is large enough to store any member of the basic execution character set. If a member of the basic execution character set is stored in a char object, its value is guaranteed to be positive. If any other character is stored in a char object, the resulting value is implementation-defined but shall be within the range of values that can be represented in that type. Donc, sur un syst�me conforme qui utilise EBCDIC, alphabet[0] vaut 129 (valeur EBCDIC pour 'a') et char est non sign� ou fait plus de 8 bits. -- Richard
Technical Details
Message-ID:
<4340ec30$0$303$7a628cd7@news.club-internet.fr>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!border2.nntp.ams.giganews.com!nntp.giganews.com!proxad.net!proxad.net!m.t-online.fr!v.t-online.fr!t-online.fr!not-for-mailReferences:
<1126342327.583568.21420@g43g2000cwa.googlegroups.com> <4329e5d4$0$7846$8fcfb975@news.wanadoo.fr> <dge4b6$fqa$1@reader1.imaginet.fr> <432ab809$0$1734$8fcfb975@news.wanadoo.fr> <mn.84b07d59016a857b.31483@laposte.net> <433f16ac$0$27406$8fcfb975@news.wanadoo.fr> <mn.10907d5a55119e84.15512@YOURBRAnoos.fr> <433f9cb1$0$7821$8fcfb975@news.wanadoo.fr> <mn.128c7d5aa5238de0.15512@YOURBRAnoos.fr> <43403203$0$5388$8fcfb975@news.wanadoo.fr> <43403d27$0$306$7a628cd7@news.club-internet.fr> <dhq3bs$dbc$1@reader1.imaginet.fr> <4340d2c9$0$27410$8fcfb975@news.wanadoo.fr>Show Full Headers
Complete Article Headers
X-Google-Thread: f9822,b21b26167a936e28 X-Google-Attributes: gidf9822,public X-Google-Language: ENGLISH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!npeer.de.kpn-eurorings.net!border2.nntp.ams.giganews.com!nntp.giganews.com!proxad.net!proxad.net!m.t-online.fr!v.t-online.fr!t-online.fr!not-for-mail Date: Mon, 03 Oct 2005 10:30:42 +0200 From: Richard Delorme <abulmo@nospam.fr> User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050801) X-Accept-Language: fr, en MIME-Version: 1.0 Newsgroups: fr.comp.lang.c Subject: Re: rot13 [Was : Re: conjugaison et autres ...] References: <1126342327.583568.21420@g43g2000cwa.googlegroups.com> <4329e5d4$0$7846$8fcfb975@news.wanadoo.fr> <dge4b6$fqa$1@reader1.imaginet.fr> <432ab809$0$1734$8fcfb975@news.wanadoo.fr> <mn.84b07d59016a857b.31483@laposte.net> <433f16ac$0$27406$8fcfb975@news.wanadoo.fr> <mn.10907d5a55119e84.15512@YOURBRAnoos.fr> <433f9cb1$0$7821$8fcfb975@news.wanadoo.fr> <mn.128c7d5aa5238de0.15512@YOURBRAnoos.fr> <43403203$0$5388$8fcfb975@news.wanadoo.fr> <43403d27$0$306$7a628cd7@news.club-internet.fr> <dhq3bs$dbc$1@reader1.imaginet.fr> <4340d2c9$0$27410$8fcfb975@news.wanadoo.fr> In-Reply-To: <4340d2c9$0$27410$8fcfb975@news.wanadoo.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Lines: 27 Message-ID: <4340ec30$0$303$7a628cd7@news.club-internet.fr> Organization: Club-Internet / T-Online France NNTP-Posting-Date: 03 Oct 2005 08:30:40 GMT NNTP-Posting-Host: 62.34.128.94 X-Trace: 1128328240 news.club-internet.fr 303 62.34.128.94 X-Complaints-To: abuse@club-internet.fr