Article View: fr.comp.lang.c
Article #15451Re: conjugaison et autres exos sur les chaines [Was : Un système de conj...]
From: Emmanuel Delahaye
Date: Tue, 20 Sep 2005 16:15
Date: Tue, 20 Sep 2005 16:15
59 lines
3740 bytes
3740 bytes
harpo wrote on 19/09/05 :
> Je crois que je comprend encore plus, c'est la notion de 'repr�sentation
> interne' qui demande � �tre clarifi�e .
C'est ce que tu vois si tu observes les bits. (Pas bien �a!)
> V�rifions :
> En r�sum�; pour en revenir au probl�me, on peut dire que ( p != NULL )
> et ( p ) sont �quivalent dans un test si p est d�clar� comme * machin
Oui.
> C'est l'impl�mentation qui rame derri�re ?
Elle fait ce qu'elle veut, on s'en fout.
> Bon, on encule un peu les mouches mais c'est important de savoir la part
> de l'impl�mentation.
>
> si j'ai compris :
>
> char * p :
> p = NULL ;
>
> if ( ! p )
> {
> // ex�cut� m�me si l'impl�mentation a pr�vu 80FE0A40
> // comme repr�sentation interne de NULL
> }
>
> if ( ! (long)p )
> {
> // pas ex�cut� si l'impl�mentation a pr�vu 80blah comme NULL
> }
>
> Ou alors le cast traduit la repr�sentation interne en 0 ?
Euh, j'en sais rien. Le comportement n'est pas d�fini par la norme. Il
l'est peut �tre par l'impl�mentation. Faut lire la doc.
> C'est tr�s compliqu� !
Le truc, c'est que la repr�sentation interne, on s'en tape (tant qu'on
a pas des pratiques douteuses comme celles que j'ai �voqu� plus t�t)...
> if ( ! (long)p )
ou �a, par exemple... J'ai indiqu� le cadre pr�cis o� le comportement
est d�fini. Si on s'en �carte, tout peut arriver.
--
Emmanuel
The C-FAQ: http://www.eskimo.com/~scs/C-faq/faq.html
The C-library: http://www.dinkumware.com/refxc.html
I once asked an expert COBOL programmer, how to
declare local variables in COBOL, the reply was:
"what is a local variable?"
Technical Details
Message-ID:
<mn.a4477d598f3848bc.15512@YOURBRAnoos.fr>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!proxad.net!infeed-3.proxad.net!news18-e.free.fr!not-for-mailReferences:
<1126342327.583568.21420@g43g2000cwa.googlegroups.com> <432b2a92$0$7861$8fcfb975@news.wanadoo.fr> <432c19e0$0$1710$8fcfb975@news.wanadoo.fr> <432cad90$0$27422$8fcfb975@news.wanadoo.fr> <432d1b7c$0$1743$8fcfb975@news.wanadoo.fr> <432d3117$0$1742$8fcfb975@news.wanadoo.fr> <mn.93877d590449a7bc.15512@YOURBRAnoos.fr> <432d7667$0$17248$8fcfb975@news.wanadoo.fr> <mn.94047d599f0cc076.15512@YOURBRAnoos.fr> <432da70c$0$1735$8fcfb975@news.wanadoo.fr> <432dd52f$0$622$626a14ce@news.free.fr> <mn.95687d59be8517f2.15512@YOURBRAnoos.fr> <432df189$0$2933$626a14ce@news.free.fr> <432e973a$0$1013$8fcfb975@news.wanadoo.fr> <432ec68e$0$3758$626a14ce@news.free.fr> <432eff47$0$27415$8fcfb975@news.wanadoo.fr> <mn.9ce67d59d5b1a352.15512@YOURBRAnoos.fr> <432f1360$0$1010$8fcfb975@news.wanadoo.fr> <mn.9d227d5938cd81c4.15512@YOURBRAnoos.fr> <432f1a6e$0$27411$8fcfb975@news.wanadoo.fr> <mn.9d347d594d0acdf0.15512@YOURBRAnoos.fr> <432f27a6$0$7845$8fcfb975@news.wanadoo.fr>Show Full Headers
Complete Article Headers
X-Google-Thread: f9822,b21b26167a936e28 X-Google-Attributes: gidf9822,public X-Google-Language: FRENCH,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!feeder.enertel.nl!nntpfeed-01.ops.asmr-01.energis-idc.net!216.196.110.149.MISMATCH!border2.nntp.ams.giganews.com!nntp.giganews.com!proxad.net!infeed-3.proxad.net!news18-e.free.fr!not-for-mail Subject: Re: conjugaison et autres exos sur les chaines [Was : Un système de conj...] From: "Emmanuel Delahaye" <emdel@YOURBRAnoos.fr> References: <1126342327.583568.21420@g43g2000cwa.googlegroups.com> <432b2a92$0$7861$8fcfb975@news.wanadoo.fr> <432c19e0$0$1710$8fcfb975@news.wanadoo.fr> <432cad90$0$27422$8fcfb975@news.wanadoo.fr> <432d1b7c$0$1743$8fcfb975@news.wanadoo.fr> <432d3117$0$1742$8fcfb975@news.wanadoo.fr> <mn.93877d590449a7bc.15512@YOURBRAnoos.fr> <432d7667$0$17248$8fcfb975@news.wanadoo.fr> <mn.94047d599f0cc076.15512@YOURBRAnoos.fr> <432da70c$0$1735$8fcfb975@news.wanadoo.fr> <432dd52f$0$622$626a14ce@news.free.fr> <mn.95687d59be8517f2.15512@YOURBRAnoos.fr> <432df189$0$2933$626a14ce@news.free.fr> <432e973a$0$1013$8fcfb975@news.wanadoo.fr> <432ec68e$0$3758$626a14ce@news.free.fr> <432eff47$0$27415$8fcfb975@news.wanadoo.fr> <mn.9ce67d59d5b1a352.15512@YOURBRAnoos.fr> <432f1360$0$1010$8fcfb975@news.wanadoo.fr> <mn.9d227d5938cd81c4.15512@YOURBRAnoos.fr> <432f1a6e$0$27411$8fcfb975@news.wanadoo.fr> <mn.9d347d594d0acdf0.15512@YOURBRAnoos.fr> <432f27a6$0$7845$8fcfb975@news.wanadoo.fr> Newsgroups: fr.comp.lang.c Message-ID: <mn.a4477d598f3848bc.15512@YOURBRAnoos.fr> X-Newsreader: MesNews/1.04.00.00-fr Date: Tue, 20 Sep 2005 18:15:18 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15"; format=flowed Content-Transfer-Encoding: 8bit Lines: 61 Organization: Guest of ProXad - France NNTP-Posting-Date: 20 Sep 2005 18:15:20 MEST NNTP-Posting-Host: 81.65.109.78 X-Trace: 1127232920 news18-e.free.fr 18845 81.65.109.78:12423 X-Complaints-To: abuse@proxad.net