Could you be more specific about that ? Because I can't understand what's your problem...Hi, I've been searching like a month and I didn't found anything useful about recursive methods in progress I would want to know if someone here could advise me.
Can I use recursive methods with Progress???
If yes, how would I could implement them.
RUN myProc(1).
PROCEDURE myProc :
DEF INPUT PARAMETER p1 AS INT.
IF p1 < 10
THEN DO :
DISP p1.
RUN myProc(p1 + 1).
END.
END PROCEDURE.
Could you be more specific about that ? Because I can't understand what's your problem...
It is possible to use recursive methods, as in most languages I think. If you mean something like that :
Code:RUN myProc(1). PROCEDURE myProc : DEF INPUT PARAMETER p1 AS INT. IF p1 < 10 THEN DO : DISP p1. RUN myProc(p1 + 1). END. END PROCEDURE.
it is possible !
procedure r:
define input parameter c as integer no-undo.
define buffer customer for customer.
find first customer no-lock where custNum > c no-error.
if not available( customer ) or ( c > 10 ) then
return.
else
run r ( customer.custNum ).
display customer.custNum customer.name with no-box no-labels.
return.
end.
run r ( 0 ).