From: eachus@mitre-bedford.arpa (Robert I. Eachus)
Subject: Re: Character Type Definition
Date: 29 Jul 91 07:56:56 GMT [thread overview]
Message-ID: <EACHUS.91Jul29005656@largo.mitre.org> (raw)
I said:
> Since the set you need is not contiguous you need a Set construct.
> If you don't have a generic Set package around ;-) all you need do is:
> type Character_Set is array (Character) of Boolean;
> pragma PACK(Character_Set)
> Now for your example the code is:
> Math_Operator: constant Character_Set :=
> ('^' | '*' | '/' | '+' | '-' => True, others => False);
> ...
> if Math_Operator(My_Operator) then...
Norm Cohen pointed out to me that 4.3.2(6) forbids the initial
value for Math_Operator unless it is qualified, in spite of the fact
that it is already constrained:
Math_Operator: constant Character_Set :=
Character_Set'('^' | '*' | '/' | '+' | '-' => True, others => False);
If this makes no sense to you, I think that you will find
yourself with lots of company. However, I think it comes under the
heading of insufficiently broken to try to fix before Ada 9X.
--
Robert I. Eachus
with STANDARD_DISCLAIMER;
use STANDARD_DISCLAIMER;
function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...
next reply other threads:[~1991-07-29 7:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1991-07-29 7:56 Robert I. Eachus [this message]
-- strict thread matches above, loose matches on Subject: below --
1991-07-24 23:16 Character Type Definition Robert I. Eachus
1991-07-23 18:47 cis.ohio-state.edu!udecc.engr.udayton.edu!blackbird.afit.af.mil!galaxy.af
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox