EasyManua.ls Logo

Casio FX-795P

Casio FX-795P
133 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
Loading...
HAPTER
5
Programming
with
BAISC
Language
ci
.
©
Using
Arrays
with
the
DIM
Mode
In
this
example,
we
will
process
two
types
of
data
by
using
two-dimensional
array
variables.
Example:
Store
the
names
and
heights.of
15
people.
Pe
10
DIM
A$(1,14)
2@
FOR
C=@
TO
14
3@
!NPUT
“NAME”
,AS
-(@,C)
4@
INPUT
SHEIGHT”
,AS(1,C)
5@
NEXT
C
6@
END
P1
1@
INPUT
“NAME”
,NS
2@
FOR
C=@
TO
14
39
|F
NS=A$(@,C)
THEN
PRINT
A$(1,C)#%om":GOTO
18
4@
NEXT
C
5@
PRINT
“NO
NAME”
6@
GOTO
18
heights
to
PO
since
this
is
the
input
program.
Pl
is
the
pertinent
person
when
a
name
is
entered.
OR
~
NEXT
loop
and
variable
N$
is
used
Input
the
names
and
program
to
display
the
height
of
the
Variable
Cis
used
for
controlling
the
F
for
temporary
storage
when
searching
a
name.
Array
A$
(0,
0)~
AS
(0,
14)
is
an
array
variable
to
store
the
names
of
15
people
and
array
A$
(1,
0)
~
AS
(1,
14)
is
an
array
variable
to
store
the
heights
of
15
people.
*On
line
30
in
P1,
when
the
name
of
the
input
person
is
concerned,
his
height
is
displayed.
Then
execution
is
jumped
to
line
10.
To
input
a
different
name,
press
the
key
when
the
height
of
previous
person
is
displayed.
5-6
Error
Messages
and
Debugging
An
error
in
a
pro;
i
gram
is
called
a
“bug”,
a
i
i
i
mailed
“debognae™
ig”,
and
tracing
and
correcting
this
error
is
Debuggi
i
ily
i
pe
veeine
=
carried
out
easily
in
the
computer
since
it
is
provided
with
an
check
mechanism
that
dis
plays
an
error
message
if
there
i
i
mt
is
an
error
in
ee
execution
or
in
the
grammar
of
the
BASIC
language.
It
is
important
to
race
bugs
persistently
since
there
m:
i
ay be
certain
cases
when
a
bug-d
-does
no
become
an
actual
error
but
the
desired
results
cannot
be
obtained.
°
1.
Debugging
with
the
Error
Message
With
the
di
'.
display
as
shown
below,
the
error
message
reveals
the
type
of
the
error,
program
area
and
the
line
number
where
the
error
occurred
BUZZER
RUN
DEG
Type
of
error
—-—t
Li
;
;
[.
Line
number
where
the
error
occurred
Program
area
where
the
error
occurred
The
Error
2
display
is
called
an
“error
code”
and
indicates
the
type
of
error
See
page
242
“Error
messages”
for
the
error
codes
103

Related product manuals