EasyManua.ls Logo

Commodore VIC-20 - Page 136

Commodore VIC-20
404 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...
122 The VIC 20
User
Guide
W$
=
MID$(n,2)+
MID$(Q$,2)
--j----
Accept T$, starting Accept Q$, starting
with second character with second character
Concatenate
nand
Q$
Our
example program, amended
to
eliminate the sign digits, appears as
follows:
10
T=12345
T = 1
1'123451
21311=67890
Q = 1
1'67890
1
30
n=STR$(T)
n
=1
I'
11
121
314151
40
Q
••
STR.(Q)
Q$
= 1 I' 1 6 1 7 1 8 1 9 1 0 1
50
W$=M'(T'/2)+MID'(Q$,2)
W$
= n
II
I 2 1 3 I 4 I 5 I + Q$I 6 I 7 I 8 I 9 I 0 I
W$
= 1 I 1 2 1 3 1 4 1 5 1 6 1 7 1 8 1 9 1 0 1
60
PRINT
"W
..
II
;""
RUN
W$=1234!567690
INPUT
AND
OUTPUT
PROGRAMMING
It
is
usually easy for beginning programmers
to
become acquainted
with how BASIC calculates numbers. When writing programs
that
receive
input from the keyboard and display
data
on the screen, however, the
programming becomes trickier.

Other manuals for Commodore VIC-20

Related product manuals