Tandy 1000 Basic Reference Manual page 297

Hide thumbs Also See for 1000:
Table of Contents

Advertisement

Chapter
10 I
BASIC Keywords
RIGHT$
Function
RIGHT$(string,nurnber)
Returns the specified number of characters from the far right
portion of
string.
Number
is an integer in the range 1 to 255.
If
number
is equal
to or
greater than the length of
string,
BASIC
returns the entire string.
Examples
P R I N T R I G H T $ ( " W A T E R M E L O N " ,
5 )
prints MELON.
P R I N T R I G H T $ ( " M I L K Y
W A Y " ,
2 5 )
prints MILKY WAY.
Sample Program
8 5 0 RESTORE : ON ERROR GOTO 8 8 0
8 6 0 R E A D COMPANY$
8 7 0 P R I N T R I G H T $ C C O M P A N Y $ , 2 1 ,
:
GOTO 860
8 8 0 E N D
8 9 0 D A T A "BECHMAN LUMBER COMPANY,
S E A T T L E , W A "
9 0 0 D A T A " E D
NORTON SEWER S E R V I C E , B R O O K L Y N , NY"
9 1 0 D A T A "HAMMON
M A N U F A C T U R I N G COMPANY
~
HAMMOND,
I N "
This program prints the name of the state in which each com-
pany is located.
295

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents