Hello,
Someone can explain me why the examples have different behavior:
example 1:
DEFINE VAR a AS Int.
teste:
DO ON ERROR undo, RETRY:
MESSAGE "oi" VIEW-AS ALERT-BOX.
Update a.
Undo, Retry teste.
END.
Example 2:
DEFINE VAR a AS Int.
teste:
DO ON ERROR undo, RETRY:
MESSAGE "oi" VIEW-AS ALERT-BOX.
assign a = random (0, 100).
Undo, Retry teste.
END.
I use update in the first....and assign in the second... both changes the variable a... but with assign the block is not repeated.
Thanks,
Éllen
Most likely because there is nothing seen as an action to retake and to prevent an infinite loop....
If you are going to use undo,retry.. always have something that checks the retry
DEFINE VAR a AS Int.
teste:
DO ON ERROR undo, RETRY:
if RETRY then MESSAGE "oi" VIEW-AS ALERT-BOX.
assign a = random (0, 100).
Undo, Retry teste.
END.
Thank you =D