GNU Pascal Homepage - gpc - gpc-announce - gpc-de - gpc-doc
Diese Seite auf deutsch

Mail #7742 (Unformatted/full headers)

Back to main page of archive

Previous mail   Next mail   Formatted
Overview  10 days   Subject   Date   Thread   Author  

From gpc-owner@gnu.de  Wed Jan 15 03:05:18 2003
Received: from mail.ncifcrf.gov ([::ffff:129.43.100.100])
	by adele.gerwinski.de with esmtp (Exim 3.12 #1 (Debian))
	id 18Ycvc-0005O2-00
	for <gpc@gnu.de>; Wed, 15 Jan 2003 03:05:16 +0100
Received: from strawberry.ncifcrf.gov (strawberry.NCIFCRF.GOV [129.43.6.74])
	by mail.ncifcrf.gov (8.11.3/8.11.3) with ESMTP id h0F23cf28219
	for <gpc@gnu.de>; Tue, 14 Jan 2003 21:03:38 -0500 (EST)
Received: (from toms@localhost)
	by strawberry.ncifcrf.gov (8.9.3+Sun/8.9.3) id VAA17128
	for gpc@gnu.de; Tue, 14 Jan 2003 21:03:38 -0500 (EST)
From: Tom Schneider <toms@ncifcrf.gov>
Message-Id: <200301150203.VAA17128@strawberry.ncifcrf.gov>
Subject: Re: Upper/lower case in identifiers
In-Reply-To: <E18YIYg-0005X7-00@adele.gerwinski.de> from "gpc-owner@gnu.de" at "Jan 14, 2003 05:20:14 am"
To: gpc@gnu.de (gpc)
Date: Tue, 14 Jan 2003 21:03:38 -0500 (EST)
X-Mailer: ELM [version 2.4ME+ PL34 (25)]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-Archive-Number: 200301/87
X-Sequence-Number: 1503

Frank:

> > ...  So if I want to cut and paste to search for the name in
> > my program, it fails.
> 
> I didn't like this as well, and that's exactly why I've brought up
> the issue.

Oh good!

> > Why not take the first [occurrence] of a variable as the name to use on
> > all output?
> 
> The first, or the most recent one, that's still a question. After
> some experimenting, there seem to be points for both ways. I'm
> implementing the latter now (though it should be easy to change).
> So, e.g.:
> 
> program Baz;
> 
> procedure Foo;
> var BaR: Integer;
> begin
> end;
> 
> begin
>   WriteLn (bar)
> end.
> 
> will complain about an unknown identifier `bar', not `BaR' ...

I would strongly vote for using the first occurrence because that is
the one which is the definition!  If one is disciplined, then all
later cases should follow the definition!

> > Note:  only Germans like to capitalize all nouns!
> 
> I know, and that's not the reason why this rule was introduced (long
> ago). Rather it was to avoid asmname conflicts with libc routines
> etc. -- see, e.g., Pierre's mail for detailed explanations.

Oh.  I think that you should either:

1. ignore the conflicts and let the user deal with them.
Warn the user that a conflict has occurred.

or

2. protect the user from such conflicts so they never have to deal
with them.

I want to be able to write 'vanilla flavor' Pascal programs that will
work on many compilers.  I have great hope that GPC is the end-all
solution, but even so it is nice to allow my programs to work on other
compilers.  So I do not want to be forced to change variable names
because of conflicts specific to the internal workings of a particular
compiler.  For example, the fact that I cannot name a procedure 'main'
on the Sun compiler is rather obnoxious - I was forced to rename all
my 'main' procedures to 'themain', and even have a tool for modifying
Pascal programs to make such variable-name switches:

http://www.lecb.ncifcrf.gov/~toms/delila/worcha.html

... written in vanilla Pascal of course!

Tom

  Dr. Thomas D. Schneider
  National Cancer Institute
  Laboratory of Experimental and Computational Biology
  Frederick, Maryland  21702-1201
  toms@ncifcrf.gov
  permanent email: toms@alum.mit.edu (use only if first address fails)
  http://www.lecb.ncifcrf.gov/~toms/

Previous mail   Next mail   Formatted
Overview  10 days   Subject   Date   Thread   Author  


Replies

Author Subject Date
Russell Whitaker Upper/lower case in identifiers 14 Jan 2003, 20:38:02
Frank Heckenbach Upper/lower case in identifiers 15 Jan 2003, 09:00:29

Back to main page of archive


Note: This page contains information that does not originate from the owner of this web site, but from the authors of the mails archived. The owner of this web site is not responsible for the content of such information. Any use of that infomation requires the consent of the respective author.

Where WWW addresses (URLs) in the mails archived are marked as hyperlinks, this is only for the comfort of the reader. The content of the web pages linked to like this does not necessarily reflect the opinion of the owner of this web site or of the authors of the mails archived. The owner of this web site is not responsible for the content of such web pages. Those pages are explicitly not to be considered as part of the content of this page, but merely as references.


This page was created by Crystal 0.999 (Linux 2.4.27/i686).