🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#2618
From: Hallvard B Furuseth
Date: Wed, 15 Nov 1995 18:14
26 lines
1145 bytes
Mike Schilling <mikes@forte.com> wrote:
>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++)

So remove '(x)':

     #define for if (0) ; else for
-- 
Regards,

Hallvard

---
[ 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: <HBF.95Nov15185013@durin.uio.no>
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
References: <9531318.2076@mulga.cs.mu.OZ.AU> <9511102010.AA05887@omega.forte.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!128.32.155.1!matt
From: h.b.furuseth@usit.uio.no (Hallvard B Furuseth)
Newsgroups: comp.std.c++
Subject: Re: New treatment of 'for (int i ...'
Date: 15 Nov 1995 18:14:16 GMT
Organization: University of Oslo, Norway
Approved: matt@physics2.Berkeley.EDU (Matt Austern)
Message-ID: <HBF.95Nov15185013@durin.uio.no>
References: <9531318.2076@mulga.cs.mu.OZ.AU> <9511102010.AA05887@omega.forte.com>
NNTP-Posting-Host: physics2.berkeley.edu