How to loop based on user input yes or no

How to loop based on user input (yes or no ) prompt. can i have code like this where the value of n is changed based on the user action & the loop continues

@For(i :=1; i <= n; i := i + 1)

n:=n+@Prompt([YESNO]; “”; “Yes will cotinue the for loop.”)

Subject: How to loop based on user input yes or no

I don’t see why you couldn’t do it that way, but why not use the @While function which seems to be designed for this case, e.g…

n := @Yes;

@While(n != @No;

n := @Prompt([YESNO]; “Continue?”; “Do you wish to continue the loop?”))