[University] Selective for Index
Osmanys Fuentes Lombá
osmanys at cies.cu
Thu Nov 20 16:40:52 CET 2014
Thanks for the answer, I'm thinking about it. The problem with generic
iteration is that you must at least know the step for the loop, that
means, from my point of view, design and develop a type that enclose
only the possible values for the set, this way you can ensure the
constraint in the steps, but, what if the steps is known only at running
time, even worst: what if the steps change from a loop to another?
That's a problem.
---
-------------------------
Lic. C. Físicas Osmanys Fuentes Lombá
Dpto. Termoconversión
Centro de Investigación de Energía Solar
Santiago de Cuba
El 2014-11-19 23:16, Quentin Ochem escribió:
> Hello Omansys,
>
> There's no easy way to do this in Ada 2012 at the moment. You could
> use an Ada 2012 generic iteration mechanism through a container, but I
> would assume this is more trouble that just writing the computation in
> the loop.
>
> Best regards,
>
> --
> Quentin Ochem
> Technical Account Manager
>
> AdaCore
> Tel: +33 (0)1 49 70 66 42
> Cell: +33 (0)6 81 12 22 15
> 46 rue d'Amsterdam
> 75 009 Paris
>
> Le 11/19/2014 3:30 PM, Osmanys Fuentes Lombá a écrit :
>>
>> Hello, I'm wondering if is possible define an index for a for loop
>> that
>> takes only selected values, for example: I want to do a bucle that
>> loops
>> only over the even values of an integer type.
>>
More information about the University
mailing list