-
Notifications
You must be signed in to change notification settings - Fork 8
return
MicroBlaster edited this page Nov 11, 2019
·
2 revisions
Purpose: Return from a subroutine.
Syntax: return
Notes: Use this command to return from a subroutine called by the "gosub" command.
If this command is used from outside a "gosub" subroutine, an error will occur.
Example:
# gosub/return demo:
echo "This is a gosub/return demo. I'm going to branch to a subroutine."
gosub :subroutine
echo "I've just returned from my subroutine"
halt
:subroutine
echo "I'm in my subroutine"
return
.