Jump to content

Does return end a function?


Recommended Posts

would it end at returning 0? or return 0 after "do more stuff" is executed?

Return stops the function and returns the value, in this case 0.

example:

msgbox(0,"Paul",_IsPaul("Paul"))
msgbox(0,"Tom",_IsPaul("Tom"))

Func _IsPaul($str)
    If $str = "Paul" Then 
        Return True
    Else
        Return False
    EndIf
EndFunc
Edited by spudw2k
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...