POSITION:028,114
COLOUR:STANDARD
TEXT:00,If you want to repeat a group of statements for a specific number of
TEXT:16,times, Euphoria offers the "for" statement:
COLOUR:EUPHORIA
TEXT:32,for    =              to           by           do
COLOUR:POINTS
TEXT:00,    ra    start value    end value    increment
TEXT:16,     one or more statements to repeat until ra > end value
COLOUR:EUPHORIA
TEXT:16,end for
COLOUR:STANDARD
TEXT:32,When the "for" statement starts, it declares a temporary index variable,
TEXT:16,  , assigning it a            . It then processes the statements
COLOUR:POINTS
TEXT:00,ra                 start value
COLOUR:STANDARD
TEXT:16,down to the         line. Once it reaches that point, it changes
COLOUR:EUPHORIA
TEXT:00,            end for
COLOUR:STANDARD
TEXT:16,  's value by adding the          . The program then loops back up to
COLOUR:POINTS
TEXT:00,ra                       increment
COLOUR:STANDARD
TEXT:16,check if    is larger than the          . If not, the statements are
COLOUR:POINTS
TEXT:00,         ra                    end value
COLOUR:STANDARD
TEXT:16,processed again, and    is changed by adding the value          . This
COLOUR:POINTS
TEXT:00,                     ra                                increment
COLOUR:STANDARD
TEXT:16,loop will keep repeating until    is larger than          . When this
COLOUR:POINTS
TEXT:00,                               ra                end value
COLOUR:STANDARD
TEXT:16,occurs,    is "undeclared", and the program continues with the next
COLOUR:POINTS
TEXT:00,        ra
COLOUR:STANDARD
TEXT:16,statement after the "end for" line.

