Mikroelektronika MIKROE-350 Fiche De Données

Page de 526
EXIT STATEMENT
The 
exit
statement allows you to break out of a routine (function or procedure). It
passes the control to the first statement following the routine call.
Here is a simple example:
sub procedure Proc1()
dim error as byte
... ' we're doing something here
if error = TRUE then
exit
end if
... ' some code, which won't be executed if error is true
end sub
Note: If breaking out of a function, return value will be the value of the local variable
result
at the moment of exit.
160
MIKROELEKTRONIKA
- SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Language Reference
mikroBasic PRO for AVR
CHAPTER 5