Jump to content
Sign in to follow this  
ryoken

How to return to a loop?

Recommended Posts

ryoken

Hello, I'm new to this forum and i have a question.

Is there a way to return to a loop?

For instance if i wanted to return to another while statement.

Is this possible? and if not then are there any alternatives?

Thanks in advance.

Share this post


Link to post
Share on other sites
MrMitchell

What was the reason for leaving the loop in the first place? And what type of loop was it? Do you have a specific example?

Share this post


Link to post
Share on other sites
ryoken

The reason for leaving the loop is to enter another loop.

The loop i'm using is a While statement.

What i'm trying to do is go from a loop for a GUI, to a loop for a Tray Icon. However i want to be able to switch back to the GUI on command.

Share this post


Link to post
Share on other sites
CodyBarrett

use a separate function with a loop in it and call that?

Share this post


Link to post
Share on other sites
ryoken

mmm, pretty new to this also. Think you could post an example? I'd really appreciate it.

Share this post


Link to post
Share on other sites
MrMitchell

The reason for leaving the loop is to enter another loop.

The loop i'm using is a While statement.

What i'm trying to do is go from a loop for a GUI, to a loop for a Tray Icon. However i want to be able to switch back to the GUI on command.

Depending on how you exit one loop to enter another, it should return back to the original loop... It sounds like you are just nesting two loops deeper and deeper, but can't be certain really.

Do you have an example or not?

Share this post


Link to post
Share on other sites
ryoken

Alright i got it figured out, I just put the 2 loops into functions and had them call eachother on command.

Thanks for the help guys.

Share this post


Link to post
Share on other sites
CodyBarrett

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  

×