Sign in to follow this  
Followers 0
Quinch

Return check

5 posts in this topic

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.

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#5 ·  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

Share this post


Link to post
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
Sign in to follow this  
Followers 0