On http://openeuphoria.org/docs/lang_loop.html#_156_loopstatements, at 4.5.1 while statement, in example 3 for loop ends with end if instead of end for.