comp.lang.ada
 help / color / mirror / Atom feed
From: hdhil@aol.com (HDhil)
Subject: Re: Ada function
Date: 2000/03/14
Date: 2000-03-14T00:00:00+00:00	[thread overview]
Message-ID: <20000314005317.01708.00002096@ng-bg1.aol.com> (raw)
In-Reply-To: 952768687.972088@srv1.space.net.au

Rees,

There is a case statement in Ada. It
takes the form

CASE <case expression> IS
        WHEN <choice1> => <statements>
        WHEN <choice2> => <statements>
               .
               .
        WHEN <choiceN> => <statements>
END CASE;

Note that <case expression> must be a discrete type, yielding an integer,
Boolean, character or user-defined enum type.

Also, every possible case value of the <case expression> must be covered in one
and only one WHEN clause. You can use
WHEN OTHERS as a final choice at the end of the CASE statement to cover
remaining values.

Hope this helps.

-Harry









      parent reply	other threads:[~2000-03-14  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-11  0:00 Ada function version_x
2000-03-11  0:00 ` Preben Randhol
2000-03-12  0:00 ` tmoran
2000-03-14  0:00 ` HDhil [this message]
replies disabled

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