Casio CFX-9800G-w Owners Manual - Page 173

Casio CFX-9800G-w - Color Graphing Calculator Manual

Page 173 highlights

As you can see, array memory names consist of an alphabetic character, followed by a subscript enclosed in brackets. The subscript is a value, either positive or negative, or a value memory that represents a value. If the value of 5 is assigned to value memory X, for example, the array memory A[X] would be equivalent to A[5]. MArray Memories to Simplify Programming Since the subscript of an array memory can be a value memory name, programming becomes more economical. Note the following. Example To write aprogram that assigns the values from 1through 10 to memories A through J Using value memories 5, -t, E3 :, 6, F, :, 7, 0, 9, :, 1, 0, J Using array memories 0, Z, Lbl, 1, Z, +, 1, A, [, Z, ], : 3 lsz, Z, Z,

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132
  • 133
  • 134
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • 142
  • 143
  • 144
  • 145
  • 146
  • 147
  • 148
  • 149
  • 150
  • 151
  • 152
  • 153
  • 154
  • 155
  • 156
  • 157
  • 158
  • 159
  • 160
  • 161
  • 162
  • 163
  • 164
  • 165
  • 166
  • 167
  • 168
  • 169
  • 170
  • 171
  • 172
  • 173
  • 174
  • 175
  • 176
  • 177
  • 178
  • 179
  • 180
  • 181
  • 182
  • 183
  • 184
  • 185
  • 186
  • 187
  • 188
  • 189
  • 190
  • 191
  • 192
  • 193
  • 194
  • 195
  • 196
  • 197
  • 198
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • 206

As
you
can
see,
array
memory
names
consist
of
an
alphabetic
character,
followed
by
a
subscript
enclosed
in
brackets.
The
subscript
is
a
value,
either
positive
or
negative,
or
a
value
memory
that
represents
a
value.
If
the
value
of
5
is
assigned
to
value
memory
X,
for
example,
the
array
memory
A[X]
would
be
equivalent
to
A[5].
MArray
Memories
to
Simplify
Programming
Since
the
subscript
of
an
array
memory
can
be
a
value
memory
name,
programming
be-
comes
more
economical.
Note
the
following.
Example
To
write
a
program
that
assigns
the
values
from
1
through
10
to
memories
A
through
J
Using
value
memories
5,
—t,
E
3
:,
6,
F,
:,
7,
0,
9,
:,
1,
0,
J
40
bytes
Using
array
memories
0
,
Z,
Lbl,
1,
Z,
+,
1,
A,
[,
Z,
],
:
3
lsz,
Z,
Z,
<,
1,
0,
Goto,
1
26
bytes
As
you
can
see;
using
array
memories
uses
14
fewer
bytes.
You
get
even
more
economy
with
the
following
program.
To
write
a
program
that
displays
the
contents
of
a
memory
specified
by
input
Using
value
memories
Lbl,
1,
:;
?,
—t,
Z,
Example
Z,
=
,
1,
A,
A,
Z,
=--,
2,
B,
A,
Z
,
=,
3,
C
3
A,
Z,
=,
4,
D,
A,
Z,
--
,
9,
I,
A,
Z,
=,
1,
0,
J,
4,
Goto,
1
70
bytes
Using
array
memories
Lbl,
1,
?,
—P,
Z,
:,
A,
[,
Z,
:1,b
A,
Goto,
1
'
16
bytes
With
value
memories,
logical
operations
are
used
to
test
the
input
until
the
proper
memory
is
found.
With
array
memories,
on
the
other
hand,
the
specified memory
is
found
im-
mediately.
MCautions
When
Using
Array
Memories
You
should
remember
that
array
memories
are
actually
based
on
value
memories.
Note
the
following
relationship.
Value
memory
Array
Memory
/
/
/
/
/
/
/
/
/-------
AICI]A[1]
Al2]
A[
31
Al4]
A[5]Al
6]
Al231
A1241
A[25]
A[261 A[271
B1
-11B[0]
B[1]
6
(
2
1
B1
3
1
[3[4]6[5]
B1221 B1231
B[24]
01251
El[26]
CI
-21G1-1]
G[0]
G[1]C[2]
CI3]Gf
4]
G[21] G[22]
c1231
G[24] G[25]
G[-61
01-5]
G[-4]
GI
-3]
GI
-21
G[-1]
G[0]
G[17]
01181
0119] 0120]
01211
X[0]Xj1
X[2]
X[3]X[4]
VI
-1]]([
0
Vii]
YE
2
]
Y[
3
]
Zi
-212(.1
]
ZI
0]
Zj
1
]
Z[2]
/
/
/
This
means
that
you
must
be
careful
when
using
array
memories
that
you
do
not
overlap.
MSample
Programs
That
Use
Array
Memory
The
following
programs
store
x
and
y
data
in
array
memories.
Whenever
an
x
value
is
input,
the
corresponding
y
value
is
displayed.
You
can
input
a
total
of
15
sets
of
data.
Example
1
With
this
version
of
the
program,
value
memory
A
is
used
as
a
data
control
memory,
while
memory
B
is
used
for
temporary
storage
of
x
data.
The
x
data
is
stored
in
memories
C[1]
(value
memory
D)
through
C[15]
(value
memory
R),
while
they
data
is
stored
in
memories
C[16]
(value
memory
S)
through
C[30]
(value
memory
Z[7]).
1,
A
3
Defm,
7,
:,
Lbl,
1,
?,
—t,
C,
[,
A,
],
:
,
?,
C,
[
3
A,
+,
1,
5,
1,
:
,
Isz,
A,
:,
A,
=,
1,
6,
Goto,
2,
:,
Got°,
1,
:
3
Lbl,
2,
:,
1,
5,
A,
:,
?,
B,
B,
=,
0,
Goto,
5,
:,
Lbl,
3,
:,
B,
=,
C,
[,
A,
],
Goto,
4,
:,
Dsz,
A,
Goto,
3,
:,
Goto,
2,
:
3
Lbl,
4,
:
,
C,
I,
A,
+,
1,
5,
],
4,
Goto,
2,
:,
Lbl,
5
98
bytes
-310-
-311-