EasyManuals Logo
Home>IBM>Laptop>5100

IBM 5100 Basic Reference Manual

IBM 5100
187 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 #53 background imageLoading...
Page #53 background image
(
(
(
(
(
(
Character
Arrays
A character array contains only character data and can have
one
or
two
dimensions.
Character arrays, like simple character variables, are named by a single letter
of
the
extended alphabet followed by
the
currency symbol ($). Thus,
the
name D$ can
refer
to
either a simple character variable
or
a character array,
or
both. The name
D$(2,4) refers
to
the
fourth
element
of
the
second row
of
a two-dimension character
array. For example:
D$
= 'JONES'
D$(2,4)
= 'SMITH'
Character arrays can be used in input,
output,
and simple matrix assignment state-
ments (when no arithmetic operation
is
performed) and can be redimensioned
as
described previously.
Summary
of
Naming Conventions
Figure 7 shows a summary
of
the
naming conventions previously described for vari-
ables and arrays. The symbol
ext
in
Figure 7 denotes a letter
of
the
BASIC
extended
alphabet (A-Z,
@,
#,
and $). Information in brackets
is
optional.
Data
Type
Name
Examples
Arithmetic variables
ext
[digit]
A,$5
Arithmetic arrays
ext
A,$,#
Character variables
ext
$
A$,
$$,@$
Character arrays
ext
$
A$,
$$,@$
Figure 7. Naming Conventions
for
Variables and Arrays
SYSTEM
FUNCTIONS
The
IBM
5100
BASIC language includes system functions
that
perform a number
of
commonly used mathematical operations.
In
addition,
you
can define and name
your
own functions by using
the
DEF statement (see DEF, FNEND, RETURN,
Chapter 4).
The system functions shown in Figure 8 can be used anywhere in a BASIC expres-
sion where constants, variables,
or
arithmetic array element references can be used,
as
shown
in
these examples:
A = SIN(&PI) + 1
B = SQA(X + 3)
Al=
AND
49

Table of Contents

Other manuals for IBM 5100

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM 5100 and is the answer not in the manual?

IBM 5100 Specifications

General IconGeneral
BrandIBM
Model5100
CategoryLaptop
LanguageEnglish

Related product manuals