Jump to content

Info on Return


Recommended Posts

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

Link to comment
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.

:)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...