Download Print this page

Radio Shack TRS-80 Owner's Manual page 130

Mini-disk operation disk operating system disk basic programming language
Hide thumbs Also See for TRS-80:

Advertisement

'WBSS&sr-
MID$(A$
S
i
,
2)
=
"":
PRINT
A$
which
returns
Lincoln.
MID$SA$*
5)
=
"12345": PRINT
A$
returns
lino
23.
MID$(A$*
5)
=
"01":
PRINT A$
returns
lincoin.
MID$(A$>
1*3)=
"***"; PRINT
A$
returns
***coln.
Sample
Program
770 CLS:
PRINT: PRINT
780 LINE INPUT "TYPE
IN
A
MONTH
AND DAY MM/DD,
"i
S$
790
P
=
INSTR(S$»
"/")
800
IF
P
=
THEN 780
810
MID*(S*»
P.
1)
=
CHR$(45)
820 PRINT
S$
"
IS
EASIER
TO
READ* ISN'T
IT?"
This
program
uses
instr
to
search
for the slash
("/")•
When
it
finds
it
(if
it
finds
it),
it
uses
mid$
=
to
substitute a
"
"
(chr$(45»
for
it.
NAME
Renumber
the
Current
Program
name
newSine,
startiine,
increment
If
omitted,
10
is
used.
riZ
:
V:>:e 5pe^f-v-?-
"W
j?:#
Vi;
~-v
;
=;
':•
;K=
-yen?,.
-:.-vv^.>r.
^^^
renumbered.
increment spes'tYm
the
increment
to
be used
between each
successive
line
number.
If
emitted, 10
!s
used.
112

Advertisement

loading

This manual is also suitable for:

Model iii