for

@forDirective

Repeats its body. The implicit attribute n is a non-negative count (@for:3) or an inclusive range (@for:0..6) that iterates upward; inside the body {{i}} splices the counter, and as: renames it. Ranges must ascend — a descending from..to is a compile error.

#Attributes

nRequiredImplicit
number | interval
How many times, or which values: a non-negative integer count (@for:3), or an inclusive from..to range (@for:0..6) that iterates upward.Can be written as shorthand: @for:value
Names the counter — as: k makes the splice {{k}} instead of {{i}} — which is how nested loops tell their counters apart. Must be a valid identifier.

#Allowed content

Body { }The content to repeat — spliced once per iteration with {{i}} substituted

#Examples

@for:0..4{
    point(x: {{i}}; y: {{i}})
}
@for(n: 1..3; as: k){
    Attempt {{k}} of 3.
}