EasyManuals Logo
Home>Atari>Desktop>XL

Atari XL User Manual

Atari XL
262 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 #62 background imageLoading...
Page #62 background image
CHAPTER 7
PIECES
OF STRINGS
String
variables
are
used
to
store
sequences
-
(strings'
-
of
characters.
There
are
a
number
of
BASIC
commands
which
are
used
to
manipulate
strings,
and
these
are
described
in
this
chapter.
We
saw
in
Chapter
4
that
a
string
variable
can
store
a
sequence
of
characters.
For
example:
NAME$
=
"WI
LLIAM
SHAKESPEARE"
GAME$ =
"SPACE
INVADERS"
REFERENCE$
="
ABC123D"
A
string
can
almost
any
number
of
characters,
limited
only
by
the
amount
of
memory
space
available.
The
maximum
length
of
any
string
must
be
specified
in
a
DIM
statement
before
the
string
is
used.
The
characters
in
a
string
may
be
letters,
figures,
punctuation
marks,
spaces
-
in
fact
any
of
the
characters
the
Atari
can
print.
The
number
of
characters
in
a
string
can
be
counted
using
the
function
LEN.
Try
this:
10
DIM
NAME$(25)
20
NAME$
=
"JOHN
SMITH"
30
PRINT
NAME$
40
PRINT
LEN(NAME$)
This
program
prints
the
length
as
10,
which
is
the
number
of
characters
in
NAME$
(including
the
space).
52

Questions and Answers:

Question and Answer IconNeed help?

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

Atari XL Specifications

General IconGeneral
BrandAtari
ModelXL
CategoryDesktop
LanguageEnglish

Related product manuals