EasyManua.ls Logo

Casio FX-795P - IF ~ THEN {Statement: statement}* { [Branched location]}; FOR Control variable name = Initial value TO Final value {STEP Numeric expression} NEXT Control variable name

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...
CHAPTER
7
Command
Reference
aaa
Conditional
expression
Statement
[
:
statement]*}
®
I
Comparison
expression
T
H
E
N
{Buached
location
}
Line
No.
#
program
area
No.
a
*
Branched
location
{
Function:
When
a
conditional
expression
is
true,
the
statements
after
THEN
are
executed.
Also,
when
a
statement
after
THEN
is
a
branched
location,
branching
is
per-
formed.
Parameter:
Conditional
expression:
Used
in
the
form
of
a
comparison
expression.
Line
No.:
1
to
9999.
Program
area
No.:
Oto
9.
Explanation:
1)
When
the
conditional
expression
is
true,
the
statements
after
THEN
are
executed
or
branching
is
performed.
2)
When
the
conditional
expression
is
false,
the
next
line
is
executed.
3)
The
related
operators
used
in
a
conditional
expression:
=
The
item
on
the
left
is
equal
to
the
item
on
the
right.
The
item
on
the
left
is
not
equal
to
the
item
on
the
right.
The
item
on
the
right
is
larger
than
that
on
the
left.
The
item
on
the
right
is
smaller
than
that
on
the
left.
The
item
on
the
right
is
larger
than
or
equal
to
that
on
the
left.
>
The
item
on
the
right
is
smaller
than
or
equal
to
that
on
the
left.
4)
When
two
or
more
conditional
expressions
exist,
several
IF
~
THEN
state-
MW VA
ments
can
be
written
sequentially.
IF~THEN
IF~THEN
5)
Since
the
statements
after
THEN
in
one
line
will
be
executed
only
after
all
conditional
expressions
are
true,
statements
to
be
executed
regardless
of
the
conditional
expression
must
be
written
asa
multistatement
before
IF
or
on
a
separate
line.
*When
a
statement
exists
after
THEN,
“;”
can
be
used
instead
of
THEN.
152
7-2
Program
Commands
Example:
10
N=12
2@
PRINT
CSR
N;
“@’;
30
K$S=KEYS
49
1F
K$="4”
THEN
N=N-121F
N<@
THEN
N=@
5@
IF
K$="6”
THEN
N=N+1:1F
N>23
=
60
PRINT
ten
wees
78
GOTO
228
*“@”
is
shifted
to
the
left
when
the
4
i
key
is
pressed
and
is
shi
right
when
the
©)
is
pressed.
B
sited
to
the
meee
FO
R
Control
variable
name
=
Initial
value
T
Final
value
®
Numeric
expression
Numeric
expression
(
ST
E
P
Nome
ores
°
|
N
EXT
Control
variable
name
Function:
Repeats
process
contained
between
FOR
and
NEXT
statements
a
number
of
times
specified
by
the
control
variable.
The
value
of
this
variable
is
changed
tom
the
initial
to
the
final
one
y
the
increment
for
e¢:
repetition
o
ie
>
tt
ti
tt
by
th
t
f
ach
tition
of
th
Parameter:
Control
variable
name:
Simple
numeric
type
variable
name.
An
array
variable
cannot
be
used.
Initial
value:
Numeric
expression
Final
value:
Numeric
expression
Increment:
Numeric
expression
The
value
1
is
taken
in
default
of
this.
153

Related product manuals