forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


cancel gosub

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
suxi
Newbie


Joined: 16 Jan 2005
Posts: 23

PostPosted: Tue Feb 15, 2005 11:52 am    Post subject: cancel gosub Reply with quote

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
View user's profile Send private message
Hooligan
VDS Developer
VDS Developer


Joined: 28 Oct 2003
Posts: 480
Location: California

PostPosted: Tue Feb 15, 2005 2:47 pm    Post subject: Reply with quote

Not clear what you want... can you post an example?

Hooligan

_________________
Hooligan

Why be normal?
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Tue Feb 15, 2005 4:09 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
suxi
Newbie


Joined: 16 Jan 2005
Posts: 23

PostPosted: Wed Feb 16, 2005 8:36 am    Post subject: Reply with quote

Thanks Jules, that'll do the trick and yes, I still have a long way to go Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group