Just curious,
I was just experimenting and noticed this.
If a subroutine is called as a procedure with a DO statement, the RETRY statement will execute the DO statement again as expected. But if the subroutine is called as a function, the RETRY statement acts like a RETURN command. I have not found any documentation that states is the case.
Does anyone have any further insight to this?
Here is a Test Case that demonstrates this
SET UDFPARMS TO REFERENCE
LOCAL i as Integer
i = 0
DO LoopLess WITH i
? i & 10
i = 0
= LoopLess( @i )
? i
PROCEDURE LoopLess
LPARAMETER j
LOCAL llResult as Boolean
llResult = .T.
j = j + 1
IF j < 10 THEN
RETRY
ENDIF
RETURN llResult
ENDPROC
Greg Reichert