In that section and the following section "Using anonymous strings with of and for..of" the same wording is used, but in the next section "Iterating over string occurrences" the expressions use the word "in" instead of the word "of". Here are some examples:
for all i in (1,2,3) : ( @a[i] + 10 == @b[i] )
for all i in (1..3) : ( @a[i] + 10 == @b[i] )
for all i in (1..#a) : ( @a[i] < 100 )
for any i in (1..#a) : ( @a[i] < 100 )
for 2 i in (1..#a) : ( @a[i] < 100 )
"In summary, the syntax of this operator is:
for expression identifier in indexes : ( boolean_expression )"
And one final, delicious example:
"In general the for..of operator has the form:
for in : ( )"
This is confusing. If the 'in' keyword may replace of the 'of' keyword this should be explicitly stated.
In the documentation at https://yara.readthedocs.io/en/stable/writingrules.html#conditions, in the section "Applying the same condition to many strings", the "for..of" operator is introduced.
In that section and the following section "Using anonymous strings with of and for..of" the same wording is used, but in the next section "Iterating over string occurrences" the expressions use the word "in" instead of the word "of". Here are some examples:
for all i in (1,2,3) : ( @a[i] + 10 == @b[i] ) for all i in (1..3) : ( @a[i] + 10 == @b[i] ) for all i in (1..#a) : ( @a[i] < 100 ) for any i in (1..#a) : ( @a[i] < 100 ) for 2 i in (1..#a) : ( @a[i] < 100 )
"In summary, the syntax of this operator is: for expression identifier in indexes : ( boolean_expression )"
And one final, delicious example:
"In general the for..of operator has the form: for in : ( )"
This is confusing. If the 'in' keyword may replace of the 'of' keyword this should be explicitly stated.
See also #1766 for other documentation issues.