[comp.lang.modula2] Modula-2 Case of the Reserved Word

apang@undergrad.cs.ubc.ca (Anthon 'Amiga' Pang) (03/03/90)

I really like Modula-2, and the environment on my Amiga is really wonderful,
but the greatest nit I have with the language is its need for reserved words
to be capitalized (eg IF, THEN, END, WHILE, MODULE, IMPLEMENTATION...).

Could someone respond with a summary of the proposed "standard" ?
I'm hoping keywords are accepted even in lower case.  If not, does anyone
know of a good/reliable/fast M2 preprocessor that'll convert keywords that
appear in lower case to upper case ?  Thanks in advance.

reid@CTC.CONTEL.COM (Tom Reid x4505) (03/03/90)

>From: Anthon 'Amiga' Pang

>I really like Modula-2, and the environment on my Amiga is really wonderful,
>but the greatest nit I have with the language is its need for reserved words
>to be capitalized (eg IF, THEN, END, WHILE, MODULE, IMPLEMENTATION...).
>
>Could someone respond with a summary of the proposed "standard" ?
>I'm hoping keywords are accepted even in lower case.  If not, does anyone
>know of a good/reliable/fast M2 preprocessor that'll convert keywords that
>appear in lower case to upper case ?  Thanks in advance.
>

I agree with you that upper case is is a bummer.  My <previous> personal
style was lower case and I have had to adapt.  I think you will find that
a preprocessor will be more trouble than its worth unless you are of the
habit of typing 1000 line programs in one sitting.  Most environments are
interactive.

Unfortunately, you will have no relief in the new standard.  It is another
case of a language forcing personal style.  However, it won't be fixed
under the "it might break existing code" principle.

Tom.

Thomas F. Reid, Ph. D.                   (703)818-4505 (work)
Contel Technology Center                 (703)742-8720 (home)
15000 Conference Center Drive            Net: reid@ctc.contel.com
P.O. Box 10814
Chantilly, Va.  22021-3808

rsutc@CS.SFU.CA (rsutc) (03/03/90)

In the proposed standard, case sensitivity is retained, as is the practice
of spelling reserved words and standard identifiers in upper case.

Rick Sutcliffe 	Associate Professor		\ (89-90 only) Visitor
		Computing Science & Mathematics	\ School of Computing Science
		Trinity Western University	\ Simon Fraser University
		7600 Glover Rd.,		\ Burnaby, B.C. Canada V5A 1S6
		Langley B.C. Canada V3A 4R9
	e-mail: Rick_Sutcliffe@cc.sfu.ca OR Compuserve 76475,3406
Chairman wg13  (Modula-2) Canada

HJ647C@GWUVM.BITNET (Pete Davis) (03/05/90)

I don't think a Modula-2 pre-processor would be too difficult at all. All
you would need is a very simple parser to check for reserved words and then
make the conversion. That couldn't take more than 10-15 minutes to write.
                                           _Pete Davis

Barry.Cornelius@DURHAM.AC.UK (03/06/90)

There was also a program published in a reasonably early issue of
"Journal of Pascal, Ada and Modula-2" .   It converted "appropriate"
identifiers from lower-case to upper-case.   The program was called
UPCASE I think.
==
Barry Cornelius
==
Computer Science Group, School of Engineering and Applied Science,
University of Durham, Durham, DH1 3LE, England
              JANET:       Barry.Cornelius@uk.ac.durham
              Internet:    Barry.Cornelius%durham.ac.uk@cunyvm.cuny.edu
              UUCP:        ...ukc!cs.nott.ac.uk!bjc
              BITNET/EARN: Barry.Cornelius%DURHAM@AC.UK
Tel: Durham (091 or +44 91) 374 2638, Secretary: 374 2630, Fax: 374 3741

RCAPENER@cc.utah.edu (03/07/90)

In article <emu-ar01.lg.1990.0306.140354.cok2@uk.ac.dur.mts>, Barry.Cornelius@DURHAM.AC.UK writes:
> There was also a program published in a reasonably early issue of
> "Journal of Pascal, Ada and Modula-2" .   It converted "appropriate"
> identifiers from lower-case to upper-case.   The program was called
> UPCASE I think.
> ==
	Shouldn't it have been more appropriately named:

	MixedUPCase?

phil@ingr.com (Phil Johnson) (03/19/90)

In article <1990Mar2.190852.1613@undergrad.cs.ubc.ca> apang@undergrad.cs.ubc.ca (Anthon 'Amiga' Pang) writes:
>I really like Modula-2, and the environment on my Amiga is really wonderful,
>
>Could someone respond with a summary of the proposed "standard" ?
>I'm hoping keywords are accepted even in lower case.  If not, does anyone
>know of a good/reliable/fast M2 preprocessor that'll convert keywords that
>appear in lower case to upper case ?  Thanks in advance.

The Benchmark Modula-2 development system for the Amiga includes a utility to
convert keyworks to uppercase.


-- 
Philip E. Johnson                    UUCP:  usenet!ingr!phil
MY words,                           VOICE:  (205) 730-8112
MY opinion!