Contents

Contents

1

1. RPL Programming

11

Understanding Programming

11

The Contents of a Program

11

Calculations in a Program

12

Entering and Executing Programs

13

Viewing and Editing Programs

16

Creating Programs on a Computer

17

Using Local Variables

17

Creating Local Variables

17

Evaluating Local Names

19

Defining the Scope of Local Variables

19

Compiled Local Variables

110

Creating UserDefined Functions as Programs

110

Using Tests and Conditional Structures

111

Testing Conditions

111

Using Conditional Structures and Commands

113

Using Loop Structures

117

Using Definite Loop Structures

117

Using Indefinite Loop Structures

122

Using Loop Counters

125

Using Summations Instead of Loops

126

Using Flags

127

Types of Flags

127

Setting, Clearing, and Testing Flags

127

Recalling and Storing the Flag States

128

Using Subroutines

129

SingleStepping through a Program

131

Trapping Errors

133

Causing and Analyzing Errors

133

Making an Error Trap

135

Input

137

Data Input Commands

137

Using PROMPT, CONT for Input

137

Using DISP FREEZE HALT, CONT for Input

139

Using INPUT, ENTER for Input

140

Using INFORM and CHOOSE for Input

145

Beeping to Get Attention

148

Stopping a Program for Keystroke Input

148

Using WAIT for Keystroke Input

148

Using KEY for Keystroke Input

149

Output

149

Data Output Commands

149

Labeling Output with Tags

150

Labeling and Displaying Output as Strings

150

Pausing to Display Output

151

Using MSGBOX to Display Output

151

Using Menus with Programs

152

Using Menus for Input

152

Using Menus to Run Programs

153

Turning Off the Calculator from a Program

155

2. RPL Programming Examples

21

 

Contents 1

Page 5
Image 5
HP 48gII Graphing, 50g Graphing manual Contents