| View previous topic :: View next topic |
| Author |
Message |
suxi Newbie
Joined: 16 Jan 2005 Posts: 23
|
Posted: Tue Feb 15, 2005 11:52 am Post subject: cancel gosub |
|
|
Good day everyone!
Is there a way to cancel a gosub command? Under certain conditions I need to restart my script from within a gosub subroutine and I am worried about the missing exit in this case.
As always, thank you for your help
suxi |
|
| Back to top |
|
 |
Hooligan VDS Developer


Joined: 28 Oct 2003 Posts: 480 Location: California
|
Posted: Tue Feb 15, 2005 2:47 pm Post subject: |
|
|
Not clear what you want... can you post an example?
Hooligan _________________ Hooligan
Why be normal? |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Tue Feb 15, 2005 4:09 pm Post subject: |
|
|
No there isn't, and it is very bad programming practise to do so. Other programming languages that have a block structure won't even allow it.
What you should do is set some global variable, exit the gosub normally, and then test the global to decide if you should restart the script after the gosub. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
suxi Newbie
Joined: 16 Jan 2005 Posts: 23
|
Posted: Wed Feb 16, 2005 8:36 am Post subject: |
|
|
Thanks Jules, that'll do the trick and yes, I still have a long way to go  |
|
| Back to top |
|
 |
|