From 7997317846548353465
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,fbc32fc9914fa748
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2000-12-08 11:48:04 PST
Path: supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!cabal10.airnews.net!news.airnews.net!cabal14.airnews.net!news.airnews.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!demon!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail
From: Jack Klein <jackklein@spamcop.net>
Newsgroups: comp.std.c++
Subject: Re: Preprocessor directive and newline
Date: Fri,  8 Dec 2000 19:47:40 GMT
Organization: AT&T Worldnet
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <GmwwOuYEnhs+v613NoRGWu=Rvh5w@4ax.com>
References: <90onv1$dci$1@front7.grolier.fr>
X-Trace: mail2news.demon.co.uk 976304868 mail2news:24869 mail2news mail2news.demon.co.uk
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Newsreader: Forte Agent 1.6/32.525
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
NNTP-Posting-Date: Fri, 08 Dec 2000 05:06:09 GMT
X-MIME-Autoconverted: from 8bit to quoted-printable by bgtnsc05-news.ops.worldnet.att.net id FAA02153
X-MIME-Autoconverted: from quoted-printable to 8bit by mulga.cs.mu.OZ.AU id QAA02898
Content-Transfer-Encoding: quoted-printable
X-MIME-Autoconverted: from 8bit to quoted-printable by mulga.cs.mu.OZ.AU id GAA11765
Lines: 41
Xref: supernews.google.com comp.std.c++:2835

On Thu,  7 Dec 2000 19:27:34 GMT, "Fran=E7ois-Xavier Callewaert"
<celine.callewaert@club-internet.fr> wrote in comp.std.c++:

>=20
> Why does the standard C++ require that a preprocessor directive be the
> only "thing" on a line(16.1) ?
>=20
>  I can readily understand why  it should be the last "thing" on a line,
> but why should it also be the first ?
>=20
>  Appart from the fact that the following line of code is probably harde=
r to
> read then the legal alternative is it somehow bad ?
>=20
>  void func();  #define BAR
>=20
>  Thanks for any enlightenment

Consider that the C++ preprocessor, inherited from C, is actually a
language of its own and knows nothing at all about the actual syntax
of C or C++, only about tokens.

Now consider this:

char *x =3D "Hello this is #define BAR";

Then again, why not?  C programmers have managed to live with this for
more than 25 years without serious difficulty (although the period for
C++ programmers is about 10 years shorter).

Jack Klein
--=20
Home: http://jackklein.home.att.net

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]
[ Note that the FAQ URL has changed!  Please update your bookmarks.     ]



