Ordering repeating spans

Usually the order of iterations of a repeat span is determined by the order of values entered by the questionnaire user. The repeat span can be ordered according to the values of any repeated variable within its scope by adding a
By
expression, which takes the general form:
Repeat
generator-expression
By
order-expression
For example, to order a list of directors by their ages:
[
Repeat NumberDirectors By DirectorAge
Name: {DirectorName}
Address: {DirectorAddress}
Age: {DirectorAge}]
For example, to order a list of directors by their age and then by their name:
[
Repeat NumberDirectors By List(DirectorAge,DirectorName)
Name: {DirectorName}
Address: {DirectorAddress}
Age: {DirectorAge}]