Jump to content

Recommended Posts

Posted

Just for a quick check about how the Return command works - does it terminate the function as soon as it's called {returning given value in the process}, or do and additional commands after it continue to execute until EndFunc is reached? It seems to be the former, but it's best to confirm.

Posted

Former. To clarify the first return in the function encountered depending on the code.

You could have multiple return statements that are condition based:

If SomeCondition Then
   Return 1
Else
  Return 0
EndIf

Just for a quick check about how the Return command works - does it terminate the function as soon as it's called {returning given value in the process}, or do and additional commands after it continue to execute until EndFunc is reached? It seems to be the former, but it's best to confirm.

Posted

From the Help File...

Use the Return keyword to exit the function. Unlike built-in functions, user-defined functions return 0 unless another return value is specified.

:P

Posted

From the Help File...

:P

Heh, thanks for the confirmation. I tried looking up the Help file, but put "return" in the search and see what you get...

Posted (edited)

Heh, thanks for the confirmation. I tried looking up the Help file, but put "return" in the search and see what you get...

Look it up by keyword (Index).

:P

Edited by DjDeep00

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...