home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- From: nikki@trmphrst.demon.co.uk (Nikki Locke)
- Path: sparky!uunet!pipex!demon!trmphrst.demon.co.uk!nikki
- Distribution: world
- Subject: Re: Novice Questions
- References: <1992Sep3.163337.13948@taumet.com>
- X-Mailer: cppnews $Revision: 1.14 $
- Organization: Trumphurst Ltd.
- Lines: 47
- Date: Fri, 4 Sep 1992 19:41:49 +0000
- Message-ID: <715660909snx@trmphrst.demon.co.uk>
- Sender: usenet@gate.demon.co.uk
-
-
- In article <1992Sep3.163337.13948@taumet.com> steve@taumet.com (Steve Clamage) writes:
-
- > nikki@trmphrst.demon.co.uk (Nikki Locke) writes:
- >
- >
- > >I HATE it when people do that ! (:-)
- >
- > >NULL is a POINTER which is guaranteed not to point to any valid location.
- > >It may or may not have the bit pattern all zeroes.
- >
- > >'\0' (ASCII NUL) is the CHARACTER which is used to terminate strings.
- >
- > >Please do not confuse the novice by using NULL to mean NUL.
- >
- > I HATE it when people do that ! (:-)
- >
- > Neither C nor C++ is required to use the ASCII character set.
- You are quite correct.
-
- I merely assumed you used the word NULL because you had heard someone
- pronounce the ASCII name of the '\0' character, and assumed they were
- saying NULL.
-
- > A literal string in C and C++ will always be terminated by an
- > implicit null character, meaning a character having zero value.
- > In source code, this may be represented as '\0' (type char).
- Nevertheless, NULL has a specific meaning in C(++), and this meaning
- should not include "character '\0'", in my opinion, because it is liable
- to confuse.
-
- > This need have nothing to do with ASCII, although the ASCII character
- > set happens to have a member of zero value which is called NUL
- > when writing about the character set.
- Right.
-
- I'm not going to get into an argument about this - if you choose to
- overload NULL to mean "character '\0'" as well as "a pointer which is
- guaranteed not to point to a valid address", that's your choice. I just
- don't happen to like it, that's all :-)
-
- ---
- Nikki Locke | | nikki@trmphrst.demon.co.uk
- Trumphurst Ltd. | Tel: +44 (0)691-670318 | nikki@cix.compulink.co.uk
- PC and Unix consultancy | Fax: +44 (0)691-670316 | nikki@kewill.co.uk
- trmphrst.demon.co.uk is NOT affiliated with ANY other sites at demon.co.uk.
- Demon.co.uk is a dial-up subscription access point to the Internet.
-