darkshark Posted March 11, 2010 Share Posted March 11, 2010 Hi guys, can you get me a question, please? I'm using autoit for a while, until I turn around and inside of my needs .... But a function that until now I did not understand what's the use, and I've seen several people using in their code is the function "return" Someone may say to me what exactly does it do? It may be useful to me! Thanks Link to comment Share on other sites More sharing options...
PhilHibbs Posted March 11, 2010 Share Posted March 11, 2010 The "Return" statement is used to exit from a function, and can also set the value that the function gives to the caller. $value = MyValue() MsgBox(0,"Value",$value) Func MyValue() Return "This is what the function returns" EndFunc Link to comment Share on other sites More sharing options...
darkshark Posted March 11, 2010 Author Share Posted March 11, 2010 The "Return" statement is used to exit from a function, and can also set the value that the function gives to the caller. $value = MyValue() MsgBox(0,"Value",$value) Func MyValue() Return "This is what the function returns" EndFunc I got it! Thank you very much Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now