A input/output commands, A display screen commands, E-119 – Casio fx-5800P User Manual
Page 120

E-119
Return
(COMP)
Syntax
... : Return : ...
Function
Returns from a subroutine to the program from the program that called the
subroutine. In a main routine, this command terminates the program.
Example
Main Routine
Subroutine (File Name: SB)
1
→ A : Prog "SB" : C ^
For A
→ B To 10 :
B + 1
→ C : Next : Return
Stop
(COMP)
Syntax
... : Stop : ...
Function
Forces termination of program execution. Execution of this command in a
subroutine terminates all execution, including all subroutines and the main
routine.
Example
For 2
→ A To 10 : If A=5 : Then "STOP" : Stop : IfEnd : Next
A Input/Output Commands
Getkey
Syntax
... : Getkey : ...
Function
Returns one of the codes shown below, which corresponds to the last key
pressed. 0 is returned when no key was pressed.
81
71
72
73
74
75
76
61
62
63
64
65
66
51
52
53
54
55
56
41
42
43
44
45
46
31
32
33
34
21
22
23
24
87
35
36
37
77
67
25
26
27
57
47
83
84
85
86
82
Note
The Getkey command can be inserted into an expression the same as a
mathematical function.
Example
Do : Cls : Locate 1,1, Ran# : Locate 1,2, "PRESS 0" : LpWhile Getkey
≠ 25
A Display Screen Commands
" "
Syntax
... : "
Function
Displays the alphanumeric characters, command, or other text enclosed in
the quotation marks (" ") as comment text.
If there are more than 16 characters, the text is wrapped to the next line. If
the current line is the bottom line on the screen, screen contents will scroll
upwards when text wrapping is performed.