AMSTRAD CPC464 User Manual page 169

Cpc464 colour personal computer 64k
Hide thumbs Also See for CPC464:
Table of Contents

Advertisement

RETURN
RETURN
RETURN
COMMAND: Signals the end of a subroutine. BASIC returns to continue processing at the point
after the GOS UB which invoked it.
Associated keywords: G O S U B , O N x G O S U B , O N S Q G O S U B ,
A F T E R n G O S U B , E V E R Y n G O S U B , O N B R E A K G O S U B
RIGHT$
R I G H T $ ( < s t r i n g e x p r e s s i o n > , < i n t e g e r e x p r e s s i o n > )
10 CLS
2 0 A % = " A M S T R A D "
3 0 B $ = R I G H T $ ( A $ , 3 )
4 0 P R I N T 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
R N D [ ( < n u m e r i c e x p r e s s i o n > ) ]
1 0 R A N D O M I Z E 2 3
2 0 P R I N T R N D
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 RANDOMIZ E 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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents