EasyManua.ls Logo

Casio FX-795P - DATA {data} [, {data}]*; READ Variable name [, variable name]*; RESTORE {Line No.}

Casio FX-795P
133 pages
Print Icon
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...
156
CHAPTER
7
Command
Reference
RETURN
Function:
Provides
a
return
from
the
subroutine
to
the
main
program.
Explanation:
Returns
to
a
statement
located
just
after
the
statement
which
called
the
sub-
routine.
Branch
condition
[Branched
location}
®
ON:
Numeric
expression
GOS
U
B
[
,
[Branched
location]
]*
Line
No.
*
Branched
location
{
#
program
area
No.
Function:
Branches
to
a
subroutine
according
to
a
branch
condition.
Parameter:
:
Branching
condition:
Numeric
expression.
Values
below
the
decimal
point
are
discarded.
Line
No.:
1
to
9999.
Program.
area
No.:
Oto
9.
Explanation:
1)
Performs
a
subroutine
branching
by
the
integer
part
of
the
value
in
a
branch
condition
expression.
Branched
locations
are
allocated
sequentially
according
to
the
value
of
the
expression.
,
ON
B
GOSUB
1000,
2000,
3000-:---
ast Baz
B=3
2)
When
the
value
of
the
expression
is
smaller
than
1
or
an
appropriate
branch-
ing
location
does
not
exist,
the
next
statement
is
executed
without
branching.
3)
As
many
branching
locations
as
can
fit
in
one
line‘can
be
written.
7-2
Program
Commands
TO
Example:
10
INPUT
A
20
ON
A
GOSUB.
100,200,300
38
GOTO
18
106
PRINT
“SUB
100”
:RETURN
200
PRINT
“SUB
200”
RETURN
300
PRINT
“SUB
300”
RETURN
*When
|
~
3
is
entered,
a
branching
to
the
corresponding
subroutine
occurs.
DATA
[data]
[,
[data]]*
()
Constant
Constant
Function:
Stores
data.
Parameter:
Data:
Character
constant
or
numeric
constant.
Explanation:
1)
Used
to
write
data
that
is
read
by
a
READ
statement.
2)
Plural
data
can
be
written
by
punctuation
with
“,”.
3)
If
only
a
DATA
statement
is
executed
without
a
READ
statement,
no
func-
tion
is
performed.
4)
When
a
character
constant
includes
“,”,
place
it
inside
”.
DATA
ABC,
DEF,
*GHI,
JKL’,------
Ist
2nd
3rd
5)
When
data
is
omitted,
a
character
string
with
a
length
of
0
is
taken
by
default.
DATA’A,
,B
DATA
A,*”,B
DATA
,
DATA
*”,*”
—>—
Null
string
DATA
DATA
6)
Even
if
a
command
is
added
to
a
DATA
statement
with
a
colon
(:),
it
will’be
regarded
as
data
and
will
not
be
executed.
DATA
12,34,56:
INPUT
A
(regarded
as
data)
157

Related product manuals