EasyManuals Logo

HP 50G User Manual

HP 50G
887 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 #705 background imageLoading...
Page #705 background image
Page 21-58
3 @@@S1@@ Result: S:14 4 @@@S1@@ Result: S:30
5 @@@S1@@ Result: S:55 8 @@@S1@@ Result: S:204
10 @@@S1@@ Result: S:385 20 @@@S1@@ Result: S:2870
30 @@@S1@@ Result: S:9455 100 @@@S1@@ Result: S:338350
The START…STEP construct
The general form of this statement is:
start_value end_value START program_statements increment
NEXT
The start_value, end_value, and increment of the loop index can be positive
or negative quantities. For increment > 0, execution occurs as long as the
index is less than or equal to end_value. For increment < 0, execution
occurs as long as the index is greater than or equal to end_value.
Example – generating a list of values
Suppose that you want to generate a list of values of x from x = 0.5 to x = 6.5
in increments of 0.5. You can write the following program:
« xs xe dx « xs DUP xe START DUP dx + dx STEP DROP xe xs
– dx / ABS 1 + LIST » »
and store it in variable @GLIST.
In this program , xs = starting value of the loop, xe = ending value of the loop,
dx = increment value for loop. The program places values of xs, xs+dx,
xs+2dx, xs+3dx, … in the stack. Then, it calculates the number of elements
generated using the piece of code: xe xs – dx / ABS 1. +
Finally, the program puts together a list with the elements placed in the stack.
Θ Check out that the program call 0.5 ` 2.5 ` 0.5 ` @GLIST
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:

Table of Contents

Other manuals for HP 50G

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP 50G and is the answer not in the manual?

HP 50G Specifications

General IconGeneral
Digits33 digits
Battery typeCR2032
TypeScientific
Form factorPocket
Weight and Dimensions IconWeight and Dimensions
Weight220 g
Dimensions (WxDxH)87 x 184 x 23.5 mm

Related product manuals