comp.lang.ada
 help / color / mirror / Atom feed
From: Philippe Torres <ptorres@laas.fr>
Subject: Re: Why the scalar types are not all discrete types ?
Date: 2000/10/13
Date: 2000-10-13T14:22:41+00:00	[thread overview]
Message-ID: <39E71AB2.A2711BDA@laas.fr> (raw)
In-Reply-To: 39E7192E.A0D424D3@laas.fr

Philippe Torres wrote:
> 
> I ask that because i would like to iterate over a fixed-point index in a
> 'for ... loop' but the 'for ... loop' demands a 'range' over a discrete
> type.
> 

Don't bother, i've done it with
---
V : fixed_2_digits := start_of_range ;
end_of_loop_value : fixed_2_digits := end_of_range ;

loop 
  some_action_on(V) ;
  exit when V = end_of_loop_value ;
  V := V'Succ ;
end loop ;
---
Even if thinking about it once should have been enough, I'll think twice
next time. Promised.

Philippe




      reply	other threads:[~2000-10-13  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-10-13  0:00 Why the scalar types are not all discrete types ? Philippe Torres
2000-10-13  0:00 ` Philippe Torres [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