
Page 21-62
Store this program in a variable
@@S3@@
. Verify the following exercises:
J
3
@@@S3@@
Result:
S:14
4
@@@S3@@
Result:
S:30
5
@@@S3@@
Result:
S:55
8
@@@S3@@
Result:
S:204
10
@@@S3@@
Result:
S:385
20
@@@S3@@
Result:
S:2870
30
@@@S3@@
Result:
S:9455
100
@@@S3@@
Result:
S:338350
Example 3 – generate a list using a DO…UNTIL…END construct
Type in the following program
«
→
xs xe dx
«
xe xs – dx / ABS 1. + xs
→
n x
«
xs DO
‘x+dx’ EVAL DUP ‘x’ STO UNTIL ‘x
≥
xe’ END n
→
LIST
»
»
»
and store it in variable
@GLIS3
.
•
Check out that the program call 0.5
`
2.5
`
0.5
`
@GLIS3
produces the list {0.5 1. 1.5 2. 2.5}.
•
To see step-by-step operation use the program DBUG for a short list, for
example:
J
1
#
1.5
#
0.5
`
Enter parameters 1 1.5 0.5
[‘]
@GLIS3
`
Enter the program name in level 1
„°LL
@)@RUN@ @@DBG@
Start the debugger.
Use
@SST
↓
@
to step into the program and see the detailed operation of each
command.
The WHILE construct
The general structure of this command is:
WHILE logical_statement REPEAT program_statements END
The WHILE statement will repeat the
program_statements
while
logical_statement
is true (non zero). If not, program control is passed to
the statement right after END. The
program_statements
must include a
Содержание 49g+
Страница 1: ...hp 49g graphing calculator user s guide H Edition 4 HP part number F2228 90006 ...
Страница 197: ...Page 5 30 LIN LNCOLLECT POWEREXPAND SIMPLIFY ...
Страница 377: ...Page 11 55 Function KER Function MKISOM ...
Страница 457: ...Page 13 26 In the right hand side figure above we are using the line editor to see the series expansion in detail ...
Страница 775: ...Page 26 10 the location of the backup battery in the top compartment at the back of the calculator ...
Страница 838: ...Page L 5 ...