EasyManuals Logo

Atari 400 User Manual

Atari 400
326 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #78 background imageLoading...
Page #78 background image
76
User's Ha
ndb
ook
to
the
Atari
400
/
800
Compute
rs
String Handling
As
a
programmer,
you will
encou
nter a
numb
er
of
situations
where
you may need to
wo
rk w
ith
s
trin
g data. For
examp
l
e,
you
might
want
to
comb
ine severa l strings,
compare
t
wo
st
rin
gs,
sepa rate
portions
of
a string,
or
even
conve
rt
st
ring data
to
its
numeric
equi
va
lent. Atari
BAS
IC allows
for
a
ll
of
the
se.
Substrings
Atari BASIC allows
the
pro
gra
mmer
to
extract a
portio
n
of
a
string,
known
as
a substring.
How
eve
r,
Atari
BAS
IC
accomp
lish
es
this extr
action
in a manner
whi
ch is very
different
fr
om
other
versions
of
BASIC,
which
u
se
MID$,
RIGHT$, and
LEFT$
to
accomp
lish this task.
Atari
BASIC u
ses
the
following
configurat
ion
to
extract a
substring.
NAME$
(first, last)
Where
NAME$
is
the
name
of
the string
from
which
the
substring
is
to
be extracted,
fir
st is
the
positi
on
of
the
first character
from
NAME$
to
be
includ
ed in the substrin
g,
and l
as
t
is
the
positi
on
of
the
l
ast
character
from
NAME$
to be in
cluded
in the substrin
g.
For exampl
e,
if
X$
consisted
of
the
following
,
"JOHN JOH
NSON"
the
s
ub
string
defined
by
X$
(1,4)
wou
ld consi
st
of
"JO
HN
", and
X$
(6,12)
wo
uld
consist
of
"JOHNSON".
Notice
that
the
blank
space in
X$
is
co
unt
ed
as
one
character
position.
The first and l
ast
character position in a s
ub
string spec
ifi
cation
can
be
specifi
ed
with
a variable
or
an
ex
pression
as
well
as
a
constant.
Also,
the
l
ast
character
position
need
not
be specified.
If
it
is
not,
the
ent
ir
e
right
hand
portion
of
the
string
will
be
returned
beginning
with
the specified first character.
Substrin
gs
ca
n
be
used
to
replace characters in larger strin
gs.
In

Other manuals for Atari 400

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atari 400 and is the answer not in the manual?

Atari 400 Specifications

General IconGeneral
ManufacturerAtari
Model400
TypeHome Computer
Release Year1979
CPUMOS Technology 6502
CPU Speed1.79 MHz
ROM10 KB
Operating SystemAtari OS
KeyboardMembrane keyboard
RAM8 KB (expandable to 48 KB)
GraphicsANTIC and GTIA chips
Sound4 channels
DisplayRF output for connection to TV
StorageOptional cassette tape drive or floppy disk drive
PortsCartridge
Display Resolution320x192 (16 colors)

Related product manuals