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

Displaying, Messages, Important, CDEIECI

Page 174 highlights

The above program uses value memories as follows x data CH] 0[2] 0[3] C[4] 0[5] C[6] C[7] 0[8] D E F G H I J K C[11] C[12] C[13] 0[14] 0[15] N 0 P 0 R C[9] C[10] L M y data • 01161 C[17] 0(18) C[191 C120] C[21] C[22] C[23] C[24] C[25] S T U V W X Y Z Z(1) Z(2) C[26] C[27] C[28] C[29] C[30] Z(3) Z(4) Z(5) Z(6) Z(7) Example 2 This version is identical to Example 1, except that a different letter is used for the x and y data names. 1, •-•, A, :, Defm, 7, ., Lbl, 1, ?, C, [, A, ], ?, -), R, [, A, ], Isz, A, : , A, =, 1, 6, Goto, 2, :, Goto, 1, Lbl, 2, :, 1, 5, A, :, ?, B, B, =, 0, Coto, 5, Lbl, 3, : , B, =, C, [, A, ], Coto, 4, :, Dsz, A, :, Goto, 3, :, Goto, 2, Lbl, 4, R, [, A, ], 4, Goto, 2, : , Lbl, 5 92 bytes This above program uses value memories as follows: x data C[1] C[2] C[3] ' C[4] C[5] C[8] C[7] C[8] D E F G H I J K C[11] C[12] C[13] 0114] 0[15] NOP Q R y data 91] 92] 93] 94] 95] 96] R[7] R[8] S T U V W X Y Z R[11] R[12] 913] 914] 915] Z(3) Z(4) Z(5) Z(6) Z(7) C[9] 0(10] L M 99] RHO] Z(1) Z(2) Note that in the above two programs the. Defm command was necessary to increase the number of value memories. 12-11 Displaying Text Messages Text, numbers, and symbols can be displayed by programs as messages that prompt input, etc. Note the following example. Statement Display Without text - ? X With text "X -= " -) X X =? As you can see, the text prompt makes it much easier to understand what input is required by the program. Messages can also be used to explain the meaning of a displayed result. •All of the explanations provided here are performed using the Program Mode only. Note, however, that you can also perfont the same operations in the File Editor Mode. Example 0, A, Lbl, '1, C, , 2, -), C,_:, Frac, C, 0, lsz, A, : , C, =, 1, Coto, 2, :, Goto, 1, :, Lbl, 2, : , ", X, =, ", 4, A, 4, Goto, 0, :, Lbl, 3, :, ", N, 0, ", 4, Goto, 0 Gotta, 3, : , 70 bytes This program prompts for input of a value. If the input value is equivalent to 2, , it displays the value of x. If the input value is not equivalent to 2,, it displays the message Important Be sure to follow the message with a display result command if there is another statement following the message. . Assuming that the program is stored in Prog 2: Ft (RUN) CDEIECIEla D113 N=? X= 12 N=? NO -312- -313-

  • 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

The
above
program
uses
value
memories
as
follows
x
data
CH]
0[2]
0[3]
C[4]
0[5]
C[6]
C[7]
0[8]
C[9]
C[10]
D
E
F
G
H
I
J
K
L
M
C[11] C[12] C[13]
0[14]
0[15]
N
y
data
01161
0
C[17]
P
0(18)
0
C[191
R
C120]
C[21] C[22]
C[23] C[24] C[25]
S
T
U
V
W
X
Y
Z
Z(1)
Z(2)
C[26] C[27] C[28] C[29] C[30]
Z(3)
Z(4)
Z(5)
Z(6)
Z(7)
Example
2
This
version
is
identical
to
Example
1,
except
that
a
different
letter
is
used
for
the
x
and
y
data
names.
1,
•-•,
A,
:,
Defm,
7,
.,
Lbl,
1,
?,
C,
[,
A,
],
?,
—),
R,
[,
A,
],
Isz,
A,
:
,
A,
=,
1,
6,
Goto,
2,
:,
Goto,
1,
Lbl,
2,
:,
1,
5,
A,
:,
?,
B,
B,
=,
0,
Coto,
5,
Lbl,
3,
:
,
B,
=,
C,
[,
A,
],
Coto,
4,
:,
Dsz,
A,
:,
Goto,
3,
:,
Goto,
2,
Lbl,
4,
R,
[,
A,
],
4,
Goto,
2,
:
,
Lbl,
5
92
bytes
This
above
program
uses
value
memories
as
follows:
x
data
C[1]
C[2]
C[3]
'
C[4]
C[5]
C[8]
C[7]
C[8]
C[9]
0(10]
D
E
F
G
H
I
J
K
L
M
C[11] C[12] C[13]
0114]
0[15]
N
y
data
91]
O
92]
P
93]
Q
94]
R
95]
96]
R[7]
R[8]
99]
RHO]
S
T
U
V
W
X
Y
Z
Z(1)
Z(2)
R[11] R[12]
913] 914]
915]
Z(3)
Z(4)
Z(5)
Z(6)
Z(7)
Note
that
in
the
above
two
programs
the.
Defm
command
was
necessary
to
increase
the
number
of
value
memories.
12-11
Displaying
Text
Messages
Text,
numbers,
and
symbols
can
be
displayed
by
programs
as
messages
that
prompt
input,
etc.
Note
the
following
example.
Statement
Display
Without
text
-
?
X
With
text
"X
-=
"
—)
X
X
=?
As
you
can
see,
the
text
prompt
makes
it
much
easier
to
understand
what
input
is
required
by
the
program.
Messages
can
also
be
used
to
explain
the
meaning
of
a
displayed
result.
•All
of
the
explanations
provided
here
are
performed
using
the
Program
Mode
only.
Note,
however,
that
you
can
also
perfont
the
same
operations
in
the
File
Editor
Mode.
Example
0
,
A,
Lbl,
'1,
C,
,
2,
—),
C,_:,
Frac,
C,
0,
Gotta,
3,
:
,
lsz,
A,
:
,
C,
=,
1,
Coto,
2,
:,
Goto,
1,
:,
Lbl,
2,
:
,
",
X,
=,
",
4,
A,
4,
Goto,
0,
:,
Lbl,
3,
:,
",
N,
0,
",
4,
Goto,
0
70
bytes
This
program
prompts
for
input
of
a
value.
If
the
input
value
is
equivalent
to
2
,
,
it
dis-
plays
the
value
of
x.
If
the
input
value
is
not
equivalent
to
2
,
,
it
displays
the
message
Important
Be
sure
to
follow
the
message
with
a
display
result
command
if
there
is
another state-
ment
following
the
message.
.
Assuming
that
the
program
is
stored
in
Prog
2:
Ft
(RUN)
CDEIECI
D113
Ela
N=?
X=
12
N=?
NO
—312—
—313—