EasyManua.ls Logo

Commodore PET - Page 224

Commodore PET
447 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...
Then. using the MID$ function at line 1101. the leftmost character
(a
blank repre-
senting a positive sign value)
is
truncated:
1101
CL$=MID$(CL$.2.LEN(CLS)-I)
CL$=MID$(jtalaI4151
4
1
4
1°12.6)
CL$=
1814151414101
At
1102. if the length of CL$
is
shorter than
F.
zeros from
ZERO$
are con-
catenated onto the front of CL$. You
will
need ta add
an
assignment statement
for a string of
Os
for variable
ZERO$;
we have done
sa
at line
15.
In
this case. the
length of CL$
is
equal ta
F.
therefore no leading zeros
are
needed.
15
ZEF.:O$="
0(1(1(10(1(10(1(1(1(10
(1(nZ1
"
1102
CL$=LEFT$(ZERO$.F-LENCCL$»+CL$
CL$=LEFT$ (ZERO$.6-6)+CL$
CL$=LEFT$
(ZERO$.O)+CL$
Then. at line 1110, CH$
is
assigned the string integer value of
AH-BH:
1110
CHS=STRSCINTCAH-BH»
CH$=STR$(ta123455-ta57)
CH$=STR$(ta12339a)
CH$-lta!11213!319151
Then. using the MID$ function, the leftmost blank character
is
truncated off:
1111
CH$=MIDSCCH$.2.LENCCHS)-1)
CH$=MID$(/taI112131319Ial.2.6)
CH$=
11121313191al
211

Table of Contents

Related product manuals