Prompt commands – HP 38g Graphing Calculator User Manual

Page 173

Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

Advertising
background image

You can use the following commands to prompt users for

input during your program—or to provide information to

users.

Prompt Commands

BEEP

Beeps at the at the frequency and time you specify.

BEEP

fr e q u e n c y ;tim e _ in _ s e c o n d s

Exan®le

BEEP 1024,-5

Creates a 5-second beep at 1024 Hz.

CHOOSE

Where

name

is the name of the variable from which the number

of the initially-highlighted item is retrieved—and into which the
number of the chosen item will be stored.

Prompt

is the top-of-

box prompt or null (meaning no prompt), and

item-1

through

item-n

are the text items to be displayed.

CHOOSE

displays a

choose box and sets the specified variable to real number 0

through n corresponding to whether the choose box is canceled

(0), or an item is chosen (1 through n).

CHOOSE

n a m e ;p r o m p t,ite m -1 ..ite m - n

Example

3{{STO^}}A: CHOOSE A;

"DILBERT“;

"CALVIN&HOBBES";

"BLONDE";

"COMIC STRIPS",

COMIC STRIFS^^

DILBERT
CflLVIN&HOBBES

BLONDE

Programming 8-21

Advertising