Re: Pointers to "why C behaves like that ?"

"Peter Flass" <peter_flass@yahoo.com>
20 Nov 2002 15:22:41 -0500

          From comp.compilers

Related articles
[9 earlier articles]
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-17)
Re: Pointers to "why C behaves like that ?" mwotton@cse.unsw.edu.au (Mark Alexander Wolton) (2002-11-20)
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-20)
Re: Pointers to "why C behaves like that ?" marcov@toad.stack.nl (Marco van de Voort) (2002-11-20)
Re: Pointers to "why C behaves like that ?" n368714668.ch@chch.demon.co.uk (Charles Bryant) (2002-11-20)
Re: Pointers to "why C behaves like that ?" peter_flass@yahoo.com (Peter Flass) (2002-11-20)
Re: Pointers to "why C behaves like that ?" peter_flass@yahoo.com (Peter Flass) (2002-11-20)
Re: Pointers to "why C behaves like that ?" er+cc@cs.brown.edu (Manos Renieris) (2002-11-20)
Re: Pointers to "why C behaves like that ?" md9slj@mdstud.chalmers.se (Stefan Ljungstrand) (2002-11-20)
Re: Pointers to "why C behaves like that ?" torbenm@diku.dk (Torben Ægidius Mogensen) (2002-11-24)
Re: Pointers to "why C behaves like that ?" torbenm@diku.dk (Torben Ægidius Mogensen) (2002-11-24)
Re: Pointers to "why C behaves like that ?" nmm1@cus.cam.ac.uk (Nick Maclaren) (2002-11-24)
Re: Pointers to "why C behaves like that ?" thp@cs.ucr.edu (2002-11-24)
[51 later articles]
| List of all articles for this month |
From: "Peter Flass" <peter_flass@yahoo.com>
Newsgroups: comp.compilers
Date: 20 Nov 2002 15:22:41 -0500
Organization: Road Runner
References: 02-11-059 02-11-087 02-11-089
Keywords: design, comment
Posted-Date: 20 Nov 2002 15:22:41 EST

Christian Bau wrote:
> > A typo in the spelling of the variable "CurrentAmunt" in line 2
> > creates a new variable "CurrentAmunt" that receives the result of the
> > addition. Since the CurrentAmount variable is stored, the account
> > receives a wrong value, and there is NO WAY to spot this bug until
> > runtime!


Not true. To use a PL/I example again the compiler would simply have
to somehow flag usage of an undeclared variable and the programmer
could easily spot the typo. Of course this assumes you declare all
your variables even when you don't have to...
[I don't see a useful difference between a system that requires that you
declare everything, vs. one that doesn't but producesundeclared variable
warnings that the programmer treats like error messages. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.