From -4216568537502897633 X-Google-Language: ENGLISH,ASCII X-Google-Thread: f78e5,fbc32fc9914fa748 X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 2000-12-08 15:08:03 PST Path: supernews.google.com!sn-xit-02!supernews.com!isdnet!newsfeeds.belnet.be!news.belnet.be!colt.net!dispose.news.demon.net!demon!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail From: "Mike Dimmick" Newsgroups: comp.std.c++ Subject: Re: Preprocessor directive and newline Date: Fri, 8 Dec 2000 23:06:29 GMT Approved: Fergus Henderson , moderator of comp.std.c++ Message-ID: <976316262.26113.5.nnrp-14.d4e5bde1@news.demon.co.uk> References: <90onv1$dci$1@front7.grolier.fr> X-Trace: mail2news.demon.co.uk 976316829 mail2news:2133 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-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Lines: 35 Xref: supernews.google.com comp.std.c++:2839 "Fran�ois-Xavier Callewaert" wrote in message news:90onv1$dci$1@front7.grolier.fr... > > Why does the standard C++ require that a preprocessor directive be the > only "thing" on a line(16.1) ? > > I can readily understand why it should be the last "thing" on a line, > but why should it also be the first ? > > Appart from the fact that the following line of code is probably harder to > read then the legal alternative is it somehow bad ? > > void func(); #define BAR > > Thanks for any enlightenment Macro definition and expansion is done in a different preprocessing phase (#4 in the standard) to the actual compilation. This simplifies the compiler a lot. HTH, -- Mike Dimmick --- [ 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. ]