Liste des Groupes | Revenir à cl c |
Well, it started off as 2-way select, meaning constructs like this:
x = c ? a : b;
x := (c | a | b)
Where one of two branches is evaluated. I extended the latter to N-way
select:
x := (n | a, b, c, ... | z)
Where again one of these elements is evaluated, selected by n (here
having the values of 1, 2, 3, ... compared with true, false above, but
there need to be at least 2 elements inside |...| to distinguish them).
I applied it also to other statements that can be provide values, such
as if-elsif chains and switch, but there the selection might be
different (eg. a series of tests are done sequentially until a true one).
I don't know how it got turned into 'multi-way'.
[...]
Les messages affichés proviennent d'usenet.