Hello,
I would like to know if it is possible to use the RETURN statement to exit from a FOR/NEXT loop that is contained in a function. In the FOR/NEXT documentation, it is mentioned not to use GOTO to exit a FOR/NEXT loop. Are there any restrictions for RETURN with FOR/NEXT ?
Ex.:
FUNCTION TestLoop ()
FOR $ i% = 1 TB 3 STEP 1
Print $ i%
IF $ i% = 2 THEN
RETURN
ENDIF
NEXT $ i%
ENDFN
Thank you
Christian