RETURN
RETURN
RETURN {var|expr}
When used with GOSUB: Execution of the program branches to the
command immediately following the most recent GOSUB command. RETURN is
used without var
or expr
.
When used with FUNC: Set the return value of a function to the value
var
or the result of the expression expr
.
Example 1: GOSUB
GOSUB my_routine
PRINT "RETURN sent me here"
END
LABEL my_routine
PRINT "I am in my routine"
RETURN
Example 2: Function
10, 20)
Result = MyAddFunction(print Result
func MyAddFunction(a, b)
return a + b
end
Code samples using RETURN
001 3 ways to print hello 5 times.bas
002 numeric variables.bas
003 conditional branching.bas
2048.bas
2048.bas
3d_palmx.bas
3dtictac.bas
3dttt.bas
3dttt.bas
7gables.bas
agendus.bas
base64.bas
betrayal: crows ii.bas
bezier_pen.bas
biorythms.bas
blackjack.bas
BlackJack.bas
bolmo.bas
bopit.bas
Chaos_1xt.bas
Chaos_NPhase.bas
checkers.bas
checkers.bas
chess.bas
chess.bas
circ.bas
colors1.bas
conrec-sb-v01.bas
crow.bas
Language
AND
AS
BAND
BG
BOR
BYREF
CALL
CASE
CATCH
CONST
DECLARE
DEF
DO
ELIF
ELSE
ELSEIF
END
END TRY
ENDIF
EQV
EXIT
FALSE
FI
FOR
FUNC
GOSUB
GOTO
IF
IFF
IMP
IN
LABEL
LET
LIKE
LOCAL
LSHIFT
MDL
MOD
NAND
NEXT
NOR
NOT
ON
OR
REM
REPEAT
RETURN
RSHIFT
SELECT
STEP
STOP
SUB
THEN
THROW
TO
TRUE
TRY
UNTIL
USE
USG
USING
WEND
WHILE
XNOR
XOR
If there is insufficient information on this page and you wish learn more about RETURN,
please send an email to smallbasic@gmail.com. You can help to improve information about
RETURN by submitting a pull request,
click View Source for details. Note, an offline language reference text file is also available - see the Download section.