EasyManuals Logo
Home>Casio>Desktop>FX-795P

Casio FX-795P User Manual

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
Page #54 background imageLoading...
Page #54 background image
CHAPTER
5
Programming
with
BASIC
Language
<.DIM
mode
and
DEFM
mode
>
It.
will
not
be
possible
to
specify
an
array
by
a
DIM
statement
and
a
DEFM
state-
ment
at
the
same
time.
That
is,
the
computer
will
select
either
the
DIM
mode
or
the
DEFM
mode
and
will
display
the
mode
such
as
“DEFM”
if
in
the
DEFM
mode.
When-power
is.
switched
ON,
the
computer
will
revert
to
the
state
it
was
in
before
power
was
switched
OFF.
Ifa
DIM
statement
was
executed,
it
will
revert
to
the
DIM
mode
and,
if
a
DEFM
statement
was
executed,
it
will
revert
to
the
DEFM
mode.
<
Precautions
when
Switching
Over
>
Precautions
will
be
required
when
switching
modes
since
the
array
declared
with
DIM
will
be
cleared
when
switching
from
the
DIM
mode
to
the
DEFM
mode,
and
the
array
declared
with
DEFM
will
be
cleared
when
switching
from
the
DEFM
mode
to
the
DIM
mode.
|
:
i
<
Array
Declaration
with
a
DIM
Statement
>
This
computer
is
capable
of
declaring
array
variables
of
up
to
three
dimensions.
These
array
variables
consist
of
two
types
which
are
the
character
array
variables
and
the
numeric
array
variables.
1)
Declaration
of
one-dimensional
array
variables
A
DIM:statement
is
used
to
declare
array
variables
and
a
one-dimensional
array
variable
will
be
specified
as
follows.
DIM
A(1@)
|
*The
numeral
10
in
parenthesis
is
called
a
subscript.
|
There
are
11
elements
in
this
array.
consisting
of
A(O),
A(1), A(2),
...
ACO).
:
These
array
elements
exist
independent
of
variables
such
as.A,
B, C,
etc.
|
which
are
numeric
variables.
A
CLEAR
statement
or
ERASE
statement
is
therefore
used
when
clearing
these
arrays.
When
declaring
two
array
variables,
punctuate
the
array
variables
with
a
comma.
DIM
A(3),B(3)
|
94
5-3
Variables
We
can
then
use
array
variables
such
as
A(0)
A(1)
A(2),
AG),
B(O),
B
>
zy
>
fy
9.
>
For
a
character
array
variable,
add
the
symbol
§
after
the
variable
name.
DIM
A$(4)
This
declares
the
array
elements
A$(0),
AS(1),
...
A$(4)
as
the
character
array
variables.
2)
Declaration
of
two-dimensional
array
variables
When
declaring
two-dimensional
array
variables
with
a
DIM
statement
punctuate
the
subscripts
with
a
comma.
DIM
A(2,3)
The
array
variable
is
now
declared
in
two-dimensions.
There
are
12
array
elements
as
shown
in
the
table
below.
y
-
A(0,
0)
A(0,
1)
A(0,
2)
A(0,
3)
x
A(1,
0)
A(1,
1)
A(1,
2)
A(1,
3)
A(2,.
0)
A(2,
1)
A(2,
2)
A(2,
3)
For
a
character
array
variable,
add
the
symbol
§
after
the
variable
name.
As
in
the
case
of
one-dimensional
array
variables,
multiple
array
variables
can
be
declared
at
the
same
time
by
punctuating
with
commas.
3)
Declaration
of
three-dimensional
array
variables
Punctuate
the
subscripts
with
commas
similar
to
when
declaring
two-dimen-
sional
array
variables.
DIM
A$(1,2,3)
Array.
declaration
is
in
three
dimensions
with
character
array
variable
A$.
There
are
24
array
elements
(2
x
3
x
4)
and
since
they
exist
independent
of
the
character
variable
A$,
the
contents
of
the
array
variable
remains
un-
changed
regardless
of
what
is
substituted
for
A$.
Similar
to
the
one-dimen-
sional
array
variable,
it
is
possible
to
declare
multiple
array
variables
at
the
same
time
by
punctuating
with
commas.
95

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Casio FX-795P and is the answer not in the manual?

Casio FX-795P Specifications

General IconGeneral
BrandCasio
ModelFX-795P
CategoryDesktop
LanguageEnglish

Related product manuals