comp.lang.ada
 help / color / mirror / Atom feed
From: Philip Anderson <phil.anderson@amsjv.com>
Subject: Re: enumration using integers?
Date: Thu, 19 Apr 2001 14:02:02 +0100
Date: 2001-04-19T14:02:02+01:00	[thread overview]
Message-ID: <3ADEE1CA.903E49FE@amsjv.com> (raw)
In-Reply-To: 3ADEC4E8.954B6830@emw.ericsson.se

Sven Nilsson wrote:
> 
> Hello
> 
> I have a little problem that I don't want to spend time solving...
> 
> If I want to make an enumerated type using integers, like:
> 
>    type Distance is (10, 20, 30, 40, 50);
> 
> The compiler will complain about missing identifiers. How do I get the
> blasted machine to understand that the integers are the identifiers I
> want?

Integers can't be identifiers, since identifiers must begin with a
letter; that's Ada not the compiler.

Use something like "I_10" or simply "Ten".


-- 
hwyl/cheers,
Philip Anderson
Alenia Marconi Systems
Cwmbr�n, Cymru/Wales



  parent reply	other threads:[~2001-04-19 13:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-19 10:58 enumration using integers? Sven Nilsson
2001-04-19 12:42 ` Marc A. Criley
2001-04-19 13:02 ` Philip Anderson [this message]
2001-04-19 14:50 ` Ted Dennison
2001-04-20  5:22   ` Sven Nilsson
2001-04-20 13:57     ` Ted Dennison
2001-04-20 14:35       ` Sven Nilsson
2001-04-20 15:50         ` Keith Thompson
2001-04-20 18:18         ` Ted Dennison
2001-04-20 15:52     ` Samuel T. Harris
replies disabled

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