comp.lang.ada
 help / color / mirror / Atom feed
* casecrash: language lawyers: C'mon!
@ 2001-07-17 12:58 Peter Hermann
  2001-07-18  3:43 ` John R. Strohm
  2001-07-19 21:37 ` Robert Dewar
  0 siblings, 2 replies; 9+ messages in thread
From: Peter Hermann @ 2001-07-17 12:58 UTC (permalink / raw)


                      with ada.text_io;use ada.text_io;
procedure casecrash is
 type record_type is (A,B,C,D,E,F,G,H,I,J,K,L,unknown);
 type header is record
    id_letter : record_type := unknown;
 end record; 
 H : Header; 
begin
 case h.id_letter is
  when A => put("a");
  when H => put("h"); -- H conflict, name clash?
                      -- no context resolution?
  when others => put("*");
 end case; 
end casecrash;--20010717ph+frehrmann

LRM:8.3(26), illegal homograph of H
LRM:8.6(28)

Why on earth should I accept this rule in this case?
Topic for Ada2005?


-- 
Peter Hermann Tel+49-711-685-3611 Fax3758 ica2ph@csv.ica.uni-stuttgart.de
Pfaffenwaldring 27 Raum 114, D-70569 Stuttgart Uni Computeranwendungen
http://www.csv.ica.uni-stuttgart.de/homes/ph/
Team Ada: "C'mon people let the world begin" (Paul McCartney)



^ permalink raw reply	[flat|nested] 9+ messages in thread
* casecrash: language lawyers: C'mon!
@ 2001-07-18  9:09 Peter Hermann
  2001-07-18 20:57 ` Tucker Taft
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Hermann @ 2001-07-18  9:09 UTC (permalink / raw)


short clarification:
my code clearly shows that I unintentionally overloaded identifier h
and I am wondering why Ada is not smart enough for context resolution.
My question still remains whether Ada2005 could be pushed forward
for such clearly obvious circumstances.

-- 
Peter Hermann Tel+49-711-685-3611 Fax3758 ica2ph@csv.ica.uni-stuttgart.de
Pfaffenwaldring 27 Raum 114, D-70569 Stuttgart Uni Computeranwendungen
http://www.csv.ica.uni-stuttgart.de/homes/ph/
Team Ada: "C'mon people let the world begin" (Paul McCartney)



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

end of thread, other threads:[~2001-07-19 21:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-17 12:58 casecrash: language lawyers: C'mon! Peter Hermann
2001-07-18  3:43 ` John R. Strohm
2001-07-18  7:18   ` Martin Dowie
2001-07-18  9:36     ` Philip Anderson
2001-07-19 21:39   ` Robert Dewar
2001-07-19 21:37 ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
2001-07-18  9:09 Peter Hermann
2001-07-18 20:57 ` Tucker Taft
2001-07-19  8:57   ` Peter Hermann

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