Jump to content

Recommended Posts

Posted

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

Posted

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

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
×
×
  • Create New...