Return Statement
The return statement causes execution to leave the current subroutine and resume at the point in the code immediately after where the subroutine was called. It's mainly intended to be used with gosub statement.
Return statement suffers from the same sort of readability problems as the GOTO statement and like goto, the use of return statement is generally discouraged.
Here is a simple example :
sub procedure Proc1() dim error as byte ... ' we're doing something here if error = TRUE then return end if ... ' some code, which won't be executed if error is true end sub

Copyright (c) 2002-2012 mikroElektronika. All rights reserved.
What do you think about this topic ? Send us feedback!
What do you think about this topic ? Send us feedback!