www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/08/26/23:29:08

From: Martin Ambuhl <mambuhl AT earthlink DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Purpose of y1() in standard library?
Date: Thu, 26 Aug 1999 20:05:39 -0400
References: <199908260851 DOT LAA09357 AT ankara DOT Foo DOT COM> <37C5CA78 DOT 2065FA1B AT earthlink DOT net>
X-Posted-Path-Was: not-for-mail
X-Accept-Language: en
X-ELN-Date: 27 Aug 1999 00:03:48 GMT
X-ELN-Insert-Date: Thu Aug 26 17:05:24 1999
Organization: Nocturnal Aviation
Lines: 34
Mime-Version: 1.0
NNTP-Posting-Host: dialup-209.246.78.64.newyork2.level3.net
Message-ID: <37C5D653.FDFE6EE7@earthlink.net>
X-Mailer: Mozilla 4.61 [en] (Win95; U)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com


Martin Ambuhl wrote:
> 
> "S. M. Halloran" wrote:
> >
> > I get warnings in much of my code about my local variable named 'y1' shadowing
> > a global, which is defined the 'math.h'.  Naming variables like 'x1', 'y1',
> > 'x2', 'y2' is rather logical for programs that plot pixels and so on, so it
> > would be rather irritating for a global to define itself that way, unless it
> > doesn't really need to be defined as such.
> 
> Maybe you should rethink the normally to be avoided use of global
> variables.

I'm sorry.  This was written too fast and with too little thought.  The
y*() functions are not part of the ANSI/ISO specs.  This warning will go
away with the use of '-ansi -pedantic'.  Otherwise, this shadowing will
not do you any harm.

> 
> --
> Martin Ambuhl   mambuhl AT earthlink DOT net
> 
> __________________________________________________________
> Fight spam now!
> Get your free anti-spam service: http://www.brightmail.com

-- 
Martin Ambuhl	mambuhl AT earthlink DOT net

__________________________________________________________
Fight spam now!
Get your free anti-spam service: http://www.brightmail.com

- Raw text -


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