RETURN
BASIC keyword | |
Keyword: | RETURN |
Abbreviation: | R, E, Shift+T |
Type: | Command |
Token code: | 142/$8E |
Handling routine in BASIC ROM: |
43218–43255 $A8D2–A8F7 |
List of all BASIC keywords |
Remark: This article describes the BASIC command RETURN in BASIC V2 at the Commodore 64.
Typ: Command General Programming-Syntax: RETURN
The BASIC command RETURN (don't confuse it with the RETURN ) finishes a subroutine, which is called by the BASIC command GOSUB. After leaving the subroutine the program continues right after the calling GOSUB statement.
As a side-effect a RETURN disposes all open FOR-NEXT stack-frames on the stack and keeps the stack in a consistent, clean state.
The BASIC error message ?RETURN WITHOUT GOSUB ERROR appears when a RETURN is executed without a prior GOSUB.
ABS | AND | ASC | ATN | CHR$ | CLOSE | CLR | CMD | CONT | COS | DATA | DEF | DIM | END | EXP | FN | FOR | FRE | GET | GET# | GOSUB | GOTO | IF | INPUT | INPUT# | INT | LEFT$ | LEN | LET | LIST | LOAD | LOG | MID$ | NEW | NEXT | NOT | ON | OPEN | OR | PEEK | π | POKE | POS | PRINT | PRINT# | READ | REM | RESTORE | RETURN | RIGHT$ | RND | RUN | SAVE | SGN | SIN | SPC | SQR | STATUS/ST | STEP | STOP | STR$ | SYS | TAB | TAN | THEN | TIME/TI | TIME$/TI$ | TO | USR | VAL | VERIFY | WAIT