comp.lang.ada
 help / color / mirror / Atom feed
* Why no named case statements?
@ 2009-09-04 23:06 Britt Snodgrass
  2009-09-04 23:47 ` Adam Beneschan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Britt Snodgrass @ 2009-09-04 23:06 UTC (permalink / raw)


Ada allows optional names for loops and declare blocks but not for
case or if statetements. Why not, since these are also multi-line
statements that terminate with an 'end" keyword? I sometimes use loop
names to clearly indicate the purpose of the loop and have wished I
could do the same for case statements, e.g.,

Decide_This:
case Some_Variable is
...
end case Decide_This;

or similarly for long if statements:

Decide_That:
if Whatever then
...
end if Decide_That:

Such names could also be used in the outline view of an IDE like
Eclipse to support quick location of the named entity.

I suppose there was some rationale so I'm curious what it was.

- Britt



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

end of thread, other threads:[~2009-09-07  7:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-04 23:06 Why no named case statements? Britt Snodgrass
2009-09-04 23:47 ` Adam Beneschan
2009-09-05  0:29 ` Robert A Duff
2009-09-05  0:49   ` Adam Beneschan
2009-09-05  1:04     ` Robert A Duff
2009-09-05  8:18 ` Dmitry A. Kazakov
2009-09-06 12:44   ` Robert A Duff
2009-09-06 17:46     ` Britt
2009-09-07  7:27       ` Ole-Hjalmar Kristensen

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