🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #2519

Re: New treatment of 'for (int i ...'

#2519
From: Mike Schilling
Date: Sat, 11 Nov 1995 06:00
17 lines
1090 bytes
Fergus Henderson (fjh@munta.cs.mu.OZ.AU) wrote:
: There is a neat hack which gives you the new behaviour with old compilers:
:
:   #ifdef USE_HACK_FOR_NEW_FOR_SCOPE
:   #define for(x) if (0) ; else for(x)
:   #endif
:
: (Did I get that right this time?)
Try this with:

    for (i = 0, p = string; *p; i++, p++)

Mike
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Technical Details
Message-ID: <9511102010.AA05887@omega.forte.com>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
References: <9531318.2076@mulga.cs.mu.OZ.AU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 11 Nov 95 06:00:42 GMT
Approved: fjh@cs.mu.oz.au
From: mikes@forte.com (Mike Schilling)
X-Original-Date: Fri, 10 Nov 1995 12:10:20 -0800
Message-ID: <9511102010.AA05887@omega.forte.com>
Subject: Re: New treatment of 'for (int i ...'
Newsgroups: comp.std.c++
References: <9531318.2076@mulga.cs.mu.OZ.AU>
Organization: Forte Software Inc.
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMKQ8NuEDnX0m9pzZAQHydAF+JtOCEokIR03Jn0IkmGiVL2prG900wCpG
 46tb3APlPv/HVOKKCY/jeD9/9IqLHG0b
 =rs28