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 #224 background imageLoading...
Page #224 background image
For example,
the
user
function
COT
(from
chapter
5)
was
written:
Here
the
local-variable structure stores
one
argument
in a local vari-
able
}::
(satisfying
the
first
requirement)
and
evaluates
the
expression
, I
t,fI..!
0::
TAt·l
0::
::<::0
::0
' (satisfying
the
second
requirement).
The
user
func-
tion
O-C
(from
chapter
14)
included
a
program
rather
than
an
expression but, since
the
program
returned
exactly
one
result,
O-C
also satisfied
the
second
requirement.
These
requirements
apply
only to
user
functions. More generally, local
variables are
used
as a
substitute
for stack
manipulations.
The
follow-
ing
example
returns
the
sum
and
difference
of
two
numbers.
Since it
returns
two results, it
can't
be
a
user
function.
«
~
x y « x y + x y - » »
For
more
examples, see
the
programs
in
chapter
28.
They
use
local-
variable
structures
more
often
to avoid stack
manipulations
than
to
create
user
functions.
Conditional
Structures
Conditional
structures
enable
a
program
to test a specified
condition
and
make
a decision
based
on
the
result
of
the
test. This section first
gives
an
example
of
a
conditional
structure.
It
uses
that
example to
discuss
program
structures
in general,
and
then
it describes
other
types
of
conditional
structures.
Suppose
you're
writing
a
program
that
uses
the
variable
x,
and
you
want
to calculate (sin x)jx. A
problem
arises
because
the
quotient
is
undefined
when
x =
O.
The
following example
returns
(sin
x)jx
if
x
=1=
0, or
returns
1 if x =
O.
IF
X 0
~
THEN
X SIN X /
ELSE
1
END
26:
Program
Structures
223

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