EasyManua.ls Logo

HP HP-28S User Manual

HP HP-28S
341 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 #230 background imageLoading...
Page #230 background image
2.
The
loop clause
44~:1
.1
BEEP
is
executed.
3.
The
command
NEXT
adds
1 to
the
counter.
4.
The
current
counter
value is
compared
with
the
final
counter
value .
•
If
the
current
counter
value
doesn't
exceed
the
final
counter
value,
steps
(2), (3),
and
(4)
are
repeated
.
•
If
the
current
counter
value exceeds
the
final
counter
value,
the
definite loop
structure
is completed,
and
program
execu-
tion
continues
after
the
NEXT
command.
In this example,
steps
(2), (3),
and
(4) are
repeated
four times.
The
loop
counter
is
first
incremented
from 1 to 2,
then
to 3,
then
to 4,
and
then
to 5. At this
point
it exceeds
the
final value 4, so
the
definite
loop
structure
ends.
Note
that
step
(1)
is
performed
before
any
tests
are
made,
so
the
loop clause is
always
evaluated
at
least once. For
another
example of START '"
NEXT,
see "FIB2 (Fibonacci
Numbers,
Loop Version)"
on
page
248.
FOR counter
...
NEXT
In
many
cases it's
handy
to
use
the
current
value
of
the
counter
as a
variable in
the
loop
clause.
To
do
so, replace START
by
FOR name.
The
counter
becomes
a local variable
with
the
specified
name.
As
be-
fore, this
manual
follows
the
convention
of
writing
local
names
in
lowercase letters to
help
you
distinguish
them
from global
names.
The
following example
puts
the
first five
square
integers
on
the
stack.
1 5 FOR x x
SQ
NEXT
The
sequence
FOR x is executed only once.
The
sequence.-..
:::;Q
is
the
loop clause,
which
is executed repeatedly.
26:
Program
Structures
229

Table of Contents

Other manuals for HP HP-28S

Question and Answer IconNeed help?

Do you have a question about the HP HP-28S and is the answer not in the manual?

HP HP-28S Specifications

General IconGeneral
Introduced1988
Memory32 KB
Number of Digits12
TypeScientific Calculator
ManufacturerHewlett-Packard (HP)
DisplayLCD
ProcessorSaturn
ProgrammingRPL

Summary

HP-28S Advanced Scientific Calculator Owner's Manual

Part 1: Fundamentals

Introduces basic operations, calculator features, and core concepts.

Getting Started

Covers initial setup, basic operations, and calculator overview.

Doing Arithmetic

Explains methods for performing calculations using stack and expressions.

Part 2: Summary of Calculator Features

Objects

Describes fundamental data types, symbolic operations, and programming elements.

The Command Line

Explains input methods, cursor control, and command entry.

The Stack

Reviews stack concepts and commands for manipulating objects.

Part 3: Programming

Program Structures

Covers conditional logic, loops, and error handling in programs.

Conditional Structures

Explains testing conditions and making decisions within programs.

Definite Loop Structures

Details structures for executing code a specific number of times.

Appendixes & Indexes

Appendix A: Assistance, Batteries, and Service

Provides troubleshooting, battery info, and service details.

Answers to Common Questions

Addresses frequent user queries and common calculator issues.

Appendix B: Notes for HP RPN Calculator Users

Highlights differences for users familiar with RPN calculators.

Appendix D: Menu Map

Lists commands by menu, with descriptions and page references.

Contacting Hewlett-Packard

Related product manuals