EasyManua.ls Logo

AMSTRAD CPC464 - Page 169

AMSTRAD CPC464
249 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
RETURN
RETURN
RETURN
COMMAND: Signals the end of a subroutine. BASIC returns to continue processing at the point
after the GOSUB which invoked it.
Associated keywords: GOSUB, ON x GOSUB, ON SQ GOSUB,
AFTER n GOSUB, EVERY n GOSUB, ON BREAK GOSUB
RIGHT$
RIGHT$(<string expression>,<integer expression>)
10 CLS
20 A% = "AMSTRAD"
30 B$ = RIGHT$(A$,3)
40 PRINT B$
RUN
[SCREEN CLEARS]
RAD
Ready
FUNCTION: Extracts the number of characters specified by the <integer expression> from the right
of the string expression. If the string expression is shorter than the required length, the whole
<string expression> is returned.
Associated keywords: MID$, LEFT$
RND
RND[(<numeric expression>)]
10 RANDOMIZE 23
20 PRINT RND
FUNCTION: Fetches a random number, which may be the next in sequence, a repeat of the last one,
or the first in a new sequence. The RANDOMIZE command in the above program ensures that RND
returns the same number each time
RND(0) returns a copy of the last random number generated. Where numeric expression1 is
negative, the number sequence generated is predictable.
Associated keywords: RANDOMIZE

Table of Contents

Other manuals for AMSTRAD CPC464

Related product manuals