Sign in to follow this  
Followers 0
slam666

Info on Return

2 posts in this topic

Hi,

When you put a Return in a Func does the program continue to execute code after the Return or does it stop there and exit the func?

Ex:

Func A

....

If $var = 1 Then

Return ERROR

Endif

More code....

EndFunc

Will the code exit the func if $var = 1 or will it continue to the end of the func then return ERROR

Share this post


Link to post
Share on other sites



Test()

Func Test()
    MsgBox(0, 'Title', 'Does this work before Return?')
    Return SetError(1)
    MsgBox(0, 'Title', 'Does this work after Return?')
EndFunc

Hope this answers your question.

:)

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  
Followers 0