From 2337491855619868665 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f78e5,e92ba5a0251f1ca0 X-Google-Attributes: gidf78e5,public X-Google-ArrivalTime: 2002-06-20 10:31:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!kibo.news.demon.net!news.demon.co.uk!demon!mail2news.demon.co.uk!not-for-mail From: Daniel James Newsgroups: comp.std.c++ Subject: Re: C++0x Wish List (deprecate null statement) Date: Thu, 20 Jun 2002 17:30:43 GMT Organization: Sonadata Limited, UK Approved: Fergus Henderson , moderator of comp.std.c++ Message-ID: References: <23b84d65.0206181331.3d79ce9b@posting.google.com> Reply-To: internet@nospam.demon.co.uk X-Trace: mail2news.demon.co.uk 1024594252 mail2news:12812 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) Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Virtual Access by Atlantic Coast PLC, http://www.atlantic-coast.com/va Lines: 34 Xref: archiver1.google.com comp.std.c++:12190 In article <23b84d65.0206181331.3d79ce9b@posting.google.com>, Allan W wrote: > We can't simply make the null statement illegal -- too much > legacy code. .. and too many debugging macros that eveluate to null statements in release builds ... > A special case of this is what some people THINK that the term > "null statement" means -- use NULL as the constant expression. > > while (*(out++)=*(in++)) NULL; // New way #3 I like that. Algol68 had the keyword SKIP for exactly this purpose: WHILE CHAR c; read(c); is white space(c) DO SKIP OD; .. but it was syntactic sugar - one could substitute any constant expression and the result would be silently voided. WHILE CHAR c; read(c); is white space(c) DO 0 OD; Cheers, Daniel. --- [ 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.jamesd.demon.co.uk/csc/faq.html ]