comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@merv.cs.nyu.edu (Robert Dewar)
Subject: Re: What's syntax for a case statement?
Date: 1997/06/12
Date: 1997-06-12T00:00:00+00:00	[thread overview]
Message-ID: <dewar.866135079@merv> (raw)
In-Reply-To: 33A0B0BE.30A8@dynamite.com.au


Alan said

<<case < name-of-a-descrete variable> is
  when <selection1> => <sequence of statements>;
  when <selection2>  | <selection3> => <sequence of statements>;
  when <selection4>..<selection5> => <sequence of statements>;
 [when others       => <sequence of statements>;
end case;
 >>


This is completely wrong, there is no requirement that the expression after
the case be the name of a discrete variable, it is a general expression.

If you are going to post syntax that can easily be looked up, at least do
it right!

Also, your style of using examples, rather than proper syntax, for the
when phrases is also confusing. It is hard to understand for example
that it is fine to have

when x | y .. z =>






  reply	other threads:[~1997-06-12  0:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-06-10  0:00 What's syntax for a case statement? Scott B Moore
1997-06-10  0:00 ` Michael F Brenner
1997-06-10  0:00 ` John G. Volan
1997-06-11  0:00 ` Darren C Davenport
     [not found] ` <5nllti$lgb@zdi.informatik.uni-stuttgart.de>
1997-06-12  0:00   ` Alan Brain
1997-06-12  0:00     ` Robert Dewar [this message]
1997-06-13  0:00       ` Alan Brain
1997-06-13  0:00         ` Robert Dewar
1997-06-12  0:00     ` David C. Hoos, Sr.
replies disabled

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