Programming
485
Sets the number of bits to represent
integer
. Valid values
are in the range –64 to 65. If
m
or
bits
is omitted, the
default value is used.
Example:
SETBITS(#1111,b15)
returns
#1111b:15
SETBASE
Syntax:
SETBASE(#integer[m][c])
Displays
integer
expressed in base
m
in whatever base is
indicated by
c
, where can be 1 (for binary), 2 (for octal),
or 3 (for hexadecimal). Parameter m can be b (for binary),
d (for decimal), o (for octal), or h (for hexadecimal). If
m
is omitted, the input is assumed to be in the default base.
Likewise, if c is omitted, the output is displayed in the
default base.
Examples:
SETBASE (#34o,1)
returns
#11100b
while
GETBASE (#1101)
returns #0h ((if the default base is
hexadecimal).
I/O
I/O commands are used for inputting data into a
program, and for outputting data from a program. They
allow users to interact with programs.
These commands start the Matrix and List editors.
CHOOSE
Syntax:
CHOOSE(
var, "title", "item1",
"item2",…,"itemn
")
Displays a choose box with the
title
and containing the
choose items. If the user selects an object, the variable
whose name is provided will be updated to contain the
number of the selected object (an integer, 1, 2, 3, …) or
0 if the user taps
.
Returns true (not zero) if the user selects an object,
otherwise return false (0).
Example:
CHOOSE
(N,"PickHero",
"Euler","Gauss
","Newton");
IF N==1 THEN
PRINT("You
picked
Euler"); ELSE
IF N==2 THEN PRINT("You picked
Summary of Contents for NW280-200X
Page 1: ...HP Prime Graphing Calculator User Guide ...
Page 4: ......
Page 56: ...50 Reverse Polish Notation RPN ...
Page 64: ...58 Computer algebra system CAS ...
Page 107: ...An introduction to HP apps 101 ...
Page 108: ...102 An introduction to HP apps ...
Page 188: ...182 Spreadsheet these variables is provided in chapter 21 Variables beginning on page 373 ...
Page 220: ...214 Statistics 2Var app ...
Page 252: ...246 Linear Solver app ...
Page 258: ...252 Parametric app ...
Page 268: ...262 Sequence app ...
Page 404: ...398 Units and constants ...
Page 416: ...410 Lists ...
Page 442: ...436 Notes and Info ...
Page 532: ...526 Limiting functionality ...
Page 536: ...530 ...
Page 540: ...534 ...