www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/08/23:35:08

From: mert0407 AT sable DOT ox DOT ac DOT uk (George Foot)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: why is this giveing me a parse error?
Date: 8 Jul 1997 21:15:02 GMT
Organization: Oxford University, England
Lines: 18
Message-ID: <5puakm$34v@news.ox.ac.uk>
References: <Pine DOT D-G DOT 3 DOT 91 DOT 970708114903 DOT 29797B-100000 AT dg1>
NNTP-Posting-Host: sable.ox.ac.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Art S. Kagel (kagel AT ns1 DOT bloomberg DOT com) wrote:
: On 4 Jul 1997, George Foot wrote:
: > In C you are not allowed to define variables within a block; your
: > definition of `bmh' must come before any code in the block, i.e. before
: > the fopen call. C++ does allow you to define variables almost anywhere
: > though.

: Wrong!  ANSI C does indeed allow one to define variables at the beginning 
: of any block!  C++ further adds the ability to define variables anywhere 
: within a block.  Please do not post mis-information.

Sorry, what I wrote was unclear; I meant of course that any definitions
must come at the start of the block, before any code in that block. My use
of `within' was erroneous.

-- 
George Foot <mert0407 AT sable DOT ox DOT ac DOT uk>
Merton College, Oxford

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019