Jump to content
Sign in to follow this  
asgarcymed

How to replace the "GoTo" missing instruction?

Recommended Posts

How to offer the possibility to repeat the whole script code's execution without the GoTo instruction?

If "GoTo" instruction was available, I could do:

[Pseudo-code]:

Begin/Start

(... main-code ...)

Repeat? (If "Yes" is chosen Then GoTo Begin/Star Else End/Exit)

End/Exit

Do I have to repeat (copy-paste) all main-code inside a Loop Statement (such as Do...Until)?

[Pseudo-code]:

Begin/Start

(... main-code ...)

Do

(... main-code repeated ...)

Until Repeat? = "No"

End/Exit

Share this post


Link to post
Share on other sites

$result = 0

Do

;Some code

$result = MsgBox(1,"","Exit loop?")

Until $result = 1

Edited by weaponx

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...