Article View: nl.comp.programmeren
Article #263Re: Lijnen tellen van een project
From: Dr.Ruud
Date: Thu, 27 Jan 2005 16:44
Date: Thu, 27 Jan 2005 16:44
27 lines
2827 bytes
2827 bytes
Toen ik John Bokma kietelde, kwam er dit uit:
> (Ik herinnerde mij iets van: NULL en 0 zijn twee dingen in C, een
> pointer kan NULL zijn, maar ook naar geheugenlocatie 0 wijzen. Als dat
> echt twee dingen zouden zijn, dan is 0 en NULL beide false)
OK, nu volg ik je. Nee, NULL en 0 zijn niet echt verschillend.
Soms is NULL gedefineerd als "((void *) 0)" maar dat wordt vrij
algemeen als onjuist gezien. Beter is 0 of (0) of 0L of (0L).
K&R, 2nd ed (ANSI), pg 102
"Pointers and integers are not interchangeable. Zero is the sole
exception:
the constant zero may be assigned to a pointer, and a pointer may be
compared with the constant zero. The symbolic constant NULL is often
used in
place of zero, as a mnemonic to indicate more clearly that this is a
special
value for a pointer. NULL is defined in <stdio.h>."
http://www.google.co.uk/search?q=%22difference+between+NULL+and+0%22
--
Affijn, Ruud ` - ?
+ ` ? *
? ` Jvr qvg yrrfg,
? = ` fgresg wbatre.
Technical Details
Message-ID:
<ctb9bk.1q8.1@news.isolution.nl>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!transit.news.xs4all.nl!post.news.xs4all.nl!not-for-mailReferences:
<%XJId.2415$OZ2.252982@phobos.telenet-ops.be> <41f37378$0$140$e4fe514c@news.xs4all.nl> <ct2bdl$2p5$1@news1.zwoll1.ov.home.nl> <Xns95E88B1A63743castleamber@130.133.1.4> <41f55352$0$26219$18b6e80@news.wanadoo.nl> <Xns95E89B5FAF7C6castleamber@130.133.1.4> <41f587d8$0$11854$e4fe514c@news.xs4all.nl> <Xns95E8CE2C13FCcastleamber@130.133.1.4> <41f60627$0$11906$e4fe514c@news.xs4all.nl> <ct5e5s.104.1@news.isolution.nl> <Xns95E982F869770castleamber@130.133.1.4> <ct6veq.4f8.1@news.isolution.nl> <Xns95EA98A5B4Dcastleamber@130.133.1.4> <ct818b.198.1@news.isolution.nl> <Xns95EA868DF1188castleamber@130.133.1.4> <ct930d.2fg.1@news.isolution.nl> <Xns95EAA862D9BDcastleamber@130.133.1.4> <ct9k2f.4js.1@news.isolution.nl> <Xns95EAD25B041B7castleamber@130.133.1.4> <ct9svc.4ko.1@news.isolution.nl> <Xns95EB6001EE123castleamber@130.133.1.4>Show Full Headers
Complete Article Headers
X-Google-Thread: 107324,ab34a8b99e320381
X-Google-Thread: fcea4,ab34a8b99e320381
X-Google-Attributes: gid107324,gidfcea4,public
X-Google-Language: DUTCH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!transit.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Message-ID: <ctb9bk.1q8.1@news.isolution.nl>
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Newsgroups: nl.comp.programmeren,be.comp.programming
References: <%XJId.2415$OZ2.252982@phobos.telenet-ops.be> <41f37378$0$140$e4fe514c@news.xs4all.nl> <ct2bdl$2p5$1@news1.zwoll1.ov.home.nl> <Xns95E88B1A63743castleamber@130.133.1.4> <41f55352$0$26219$18b6e80@news.wanadoo.nl> <Xns95E89B5FAF7C6castleamber@130.133.1.4> <41f587d8$0$11854$e4fe514c@news.xs4all.nl> <Xns95E8CE2C13FCcastleamber@130.133.1.4> <41f60627$0$11906$e4fe514c@news.xs4all.nl> <ct5e5s.104.1@news.isolution.nl> <Xns95E982F869770castleamber@130.133.1.4> <ct6veq.4f8.1@news.isolution.nl> <Xns95EA98A5B4Dcastleamber@130.133.1.4> <ct818b.198.1@news.isolution.nl> <Xns95EA868DF1188castleamber@130.133.1.4> <ct930d.2fg.1@news.isolution.nl> <Xns95EAA862D9BDcastleamber@130.133.1.4> <ct9k2f.4js.1@news.isolution.nl> <Xns95EAD25B041B7castleamber@130.133.1.4> <ct9svc.4ko.1@news.isolution.nl> <Xns95EB6001EE123castleamber@130.133.1.4>
Subject: Re: Lijnen tellen van een project
Date: Thu, 27 Jan 2005 17:44:47 +0100
Organization: Chaos rules.
X-Newsreader: WMDIYB
X-Archive-Me: please
Approved: yesterday
X-Face: &CQ$FIr!=+=w,8`0Q^Ug"1>F[(/op8->E;NQet`5fe$;=e*!Z5&REvp<~Tj|"Y[|8OcJ{w#z&mB7B:I)XO*%_|\]|YW$C>>$Q[9-#K~c$tQ^Mf0,wMo?h\C)TE>f
Lines: 29
NNTP-Posting-Host: 194.109.164.102
X-Trace: 1106844602 news.xs4all.nl 22162 [::ffff:194.109.164.102]:33022
X-Complaints-To: abuse@xs4all.nl