comp.lang.ada
 help / color / mirror / Atom feed
* Case Sensitivity
@ 2000-05-11  0:00 Cameron McShane
  2000-05-11  0:00 ` Florian Weimer
                   ` (4 more replies)
  0 siblings, 5 replies; 15+ messages in thread
From: Cameron McShane @ 2000-05-11  0:00 UTC (permalink / raw)


Hey

I am doing a project for Uni, and am a bit stuck.

We need a menu that needs to be case-'in'sensitive. I am using an enumerated
data type for the 3 menu options ie:

    type Menu_Options is (buy, read, done)

If the user is to be allowed to enter Buy or BUY or bUy - etc, do I need to
make the data type

    type Menu_Options is (buy, Buy, bUY, etc

or is there a way of converting user input to all lower case?

Any help Would be greatly appreciated.

Cheers

Cameron






^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: case sensitivity
@ 1993-07-04  9:12 Erik Magnuson
  0 siblings, 0 replies; 15+ messages in thread
From: Erik Magnuson @ 1993-07-04  9:12 UTC (permalink / raw)


In article <PAT.93Jul1160332@crl-sc2.nmsu.edu> pat@nmsu.edu (Pat Gioannini) wri
tes:
>
>Do any of the pretty printers out there use the capitalization 
>of the first reference of an identifier? 

A few years ago I added this to NAPP. It wasn't very hard. I even
supported a way to provide a "dictionary" of indentifier spellings to
use. (But I did not get around to implementing patterns.)
Unfortunately, those changes have been lost in the mists of time as I
was unable to fix some other aspects of NAPP's output. Oh, well. These
days I settle for post processing my vendor's pretty printer output with a
simple perl script.

--
Erik

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: case sensitivity
@ 1993-07-02 15:53 Robert I. Eachus
  0 siblings, 0 replies; 15+ messages in thread
From: Robert I. Eachus @ 1993-07-02 15:53 UTC (permalink / raw)


In article <PAT.93Jul1160332@crl-sc2.nmsu.edu> pat@nmsu.edu (Pat Gioannini) wri
tes:

  > Do any of the pretty printers out there use the capitalization 
  > of the first reference of an identifier?  I have a probem with 
  > the pretty printer we use will either leave all identifiers alone,
  > capitalize the first letter ( and the letter after each underscore ),
  > make all identifiers uppercase or make all identifiers lower case.

    This is in the "tough problem" category.  Since finding the
correct declaration requires parsing the file and doing overload
resolution, it is only possible to do this for source files which are
correct compilable Ada.  (And, of course, with reference to a
particular program library.)

    The rule I have used for formatters which accept non-legal
programs is either to use the first appearance of an identifier in the
file OR to use a particular rule and have a file of personal
exceptions.  What I keep intending to do is build a tool that takes a
file of starname style exceptions:

    *_IO
    ADAR_*
    SPARC_*
    ...

    hmmm...an easier case might be to treat underscores as separators:

    IO
    ADAR
    SPARC

    that would make a fairly simple standalone tool.

    My plate is fairly full right now, but if anyone wants to work on
this, I'll be glad to help supply the easy 75%. (The pieces already
done of course. :-)


					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...
--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...

^ permalink raw reply	[flat|nested] 15+ messages in thread
* case sensitivity
@ 1993-07-01 23:03 cis.ohio-state.edu!pacific.mps.ohio-state.edu!math.ohio-state.edu!darwin.
  0 siblings, 0 replies; 15+ messages in thread
From: cis.ohio-state.edu!pacific.mps.ohio-state.edu!math.ohio-state.edu!darwin. @ 1993-07-01 23:03 UTC (permalink / raw)


Do any of the pretty printers out there use the capitalization 
of the first reference of an identifier?  I have a probem with 
the pretty printer we use will either leave all identifiers alone,
capitalize the first letter ( and the letter after each underscore ),
make all identifiers uppercase or make all identifiers lower case.

I would much rather have the pretty printer use the case of the declaration
of each identifier through out the program.  This would allow abbreviations
to be in all upper case.


For example,

	type organization is record
	....
	end record


	TLA 				: organization;
	Three_Letter_Abbreviation	: organization;
	

I would like all future reference to be either TLA or 
Three_Letter_Abbreviation; not Tla and Three_Letter_Abbreviation, or
TLA and THREE_LETTER_ABBREVIATION.



pat

^ permalink raw reply	[flat|nested] 15+ messages in thread
* case sensitivity
@ 1989-02-20 19:45 pse_papay
  1989-02-21  8:18 ` Bruce Anderson
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: pse_papay @ 1989-02-20 19:45 UTC (permalink / raw)


In volume 89, issue 54 Bruce Anderson asked:
>
> ... does everyone think that the case-insensitivity of Ada is a positive
> feature and if so why?
>
The reason for Ada's case insensitivity is one of portability.  Ada was designed
to be the common higher order programming language for the DoD.  Since some of
the computers used by the DoD may not support upper and lower case characters, 
Ada cannot be a case sensitive language.  

Is this a positive feature of the language?  When one takes into account the
issue of portability, I think it is a very positive feature.  As for the
rest of the computer science community, I can only assume that a large number
of people feel the same way, as this feature was required by the "Steelman" 
document.

One last comment: Its too bad that many people feel "forced" to use Ada,
as Mr. Anderson's company is.  Why is it that when a group of C, or FORTRAN, 
or Pascal programmers get together (at a conference, workshop, et al), they're 
there because they _want_ to, while when a group of Ada programmers get 
together, many are there because they _have_ to?


David F. Papay                         papayd@gtewd.arpa
GTE Government Systems Corp.
100 Ferguson Dr.                       (415)-694-1522
PO Box 7188  M/S 5G09
Mountain View, CA  94039

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2000-05-15  0:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-11  0:00 Case Sensitivity Cameron McShane
2000-05-11  0:00 ` Florian Weimer
2000-05-11  0:00 ` Ted Dennison
2000-05-11  0:00 ` Alfred Hilscher
2000-05-11  0:00 ` Gautier
2000-05-12  0:00 ` John English
2000-05-12  0:00   ` David C. Hoos, Sr.
2000-05-15  0:00     ` John English
  -- strict thread matches above, loose matches on Subject: below --
1993-07-04  9:12 case sensitivity Erik Magnuson
1993-07-02 15:53 Robert I. Eachus
1993-07-01 23:03 cis.ohio-state.edu!pacific.mps.ohio-state.edu!math.ohio-state.edu!darwin.
1989-02-20 19:45 pse_papay
1989-02-21  8:18 ` Bruce Anderson
1989-02-22 22:28 ` Steven D. Litvintchouk
1989-02-27 14:45 ` Dennis M. O'Connor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox