On 10/3/06, René Haber <rene.haber@freenet.de> wrote:

I'm looking for an easy way to iterate over a set by a user selected
index.

(example)

How can I dynamically change the iterator used in this loop to let the user
decide the sort criteria?

The loop is resolved at compile time. You will have to use a higher level approach to dynamically choose between the two hard-code loops.
Maybe a simple switch is enough in this case.

Best regards
Matias