HP 49g User Manual

HP49G
GRAPHING CALCULATOR
ADVANCED
USER’S GUIDE
HP 49G
ciLe.; (¿M' (iik
0 IT fl • ^ ’
/¡'0 0 4
c <3 (3 fl «
Ej lZj Ll^i CEJ 1-?lJ
J QD vIaj Caj l~ j
G?1 ZJ2 CjJ Li-J C±..j
HEWLETT*
mllnM PACKARD
< V -
o a a a a
o a ^ /3 a G
Contents
Preface vii
Material covered...................................................................................vii
The HP 49G documentation set ........................................................viii
Chapter 1: Entering commands 1-1
Keyboard entry....................................................................................1-1
Subject-specific menus .......................................................................1-1
Sub-menus.......................................................................................1-2
Entering a command from a sub-menu Entering a command from a function key menu
Command catalog................................................................................1-4
Displaying the command catalog Locating a command in the command catalog
Typing commands ..............................................................................1-6
Chapter 2: System flags 2-1
Displaying system flags
Setting and clearing flags....................................................................2-2
Setting or clearing several flags at once .....................................2-3
Flag commands....................................................................................2-4
User flags ..............................................................................................2-4
....................................................................
Chapter 3: Command line operations 3-1
Activating the command line ............................................................3-1
Positioning the cursor
Main methods: single-line command line
Main methods: multi-line command line
Helpful commands and sub-menus .................................................3-3
Selecting characters
Copy, cut, and paste ...........................................................................3-4
Editing the command line
Deleting characters.........................................................................3-5
Inserting characters........................................................................3-6
Editing complex objects
Evaluating components of the command line
Suspending editing........................................................................3-7
Find and replace.............................................................................3-8
Command line infonnation .............................................................3-12
Styles .............................................................................................3-13
.........................................................................
............................................................................
..................................................................
...............................................................
......................................
.....................
................................................
..........................
..................................
...................................
...........................
1-3 1-3
1-4 1-4
2-1
3-2 3-2 3-2
3-4
3-5
3-6 3-7
Contents Page i
Chapter 4: The Stack 4-1
Using the stack ....................................................................................4-1
Example stack calculations ................................................................4-2
Using a one-argument command Using a multi-argument command Multi-conmrand calculations
................................................
............................................
.......................................................
4-2 4-3 4-4
Chapter 5: Matrices and linear algebra 5-1
Matrix Writer operations....................................................................5-1
To move around an array To edit an array
..............................................................................
To make the cells narrower or wider To control how the cursor moves after an entiy
Manipulating columns and rows.................................................5-4
Siimmarji' of Matrix Writer operations.............................................5-6
Advanced matrix operations..............................................................5-7
Creating special matrices
Assembling matrices .....................................................................5-8
Disassembling matrices...............................................................5-10
Inserting rows and colimms
Extracting rows and cohmins.....................................................5-12
Swapping rows and columns ....................................................5-12
Extracting and replacing elements of matrices Characterizing matrices Transforming matrices
More matrix arithmetic................................................................5-17
Transforming complex matrices .................................................5-18
Linear algebra topics ..........................................................................5-19
Eigenvalues and eigenvectors To compute the eigenvalues for a square matrix To compute the eigenvalues and eigenvectors for a square
matrix.............................................................................................5-20
To compute the singular values of a matrix To decompose or factor a matrix
............................................................
..........................................
........................
.............................................................
.......................................................
........................
..............................................................
................................................................
....................................................
.....................
.............................
...............................................
5-1 5-2 5-3 5-3
5-7
5-11
5-13
5-14 5-16
5-19
5-19
5-20
5-21
Page ii
Contents
Chapter 6: Unit objects 6-1
Ovei^view of the Units application
Unit objects .......................................................................................... 6-2
To create a imit object....................................................................6-2
To assemble a imit object from the stack
Unit prefixes ...................................................................................6-3
Converting imits
To convert from one unit to another
To convert units to SI base emits
Calculating with emits .......................................................................6-5
Sample emit calceilations..............................................................6-6
Factoring emit expressions.................................................................6-8
To factor emits within a emit expression....................................6-8
Working with temperature miits.......................................................6-8
Converting temperateere emits ...................................................6-9
..................................................................................
..................................................
......................................
.............................................
..................................................
6-1
6-4
Chapter 7: Constants library 7-1
To view the constaiets library
To view the valeie and emits of a particeilar constant
To copy a constaiet to the stack or history.........................................7-3
To include a constant in an algebraic expression .............................7-4
............................................................
..............
7-3
Chapter 8: Number bases 8-1
Enteriirg and displaying binary integers
To set the base.................................................................................8-1
To set the wordsize........................................................................8-2
To recall the current wordsize .....................................................8-2
To enter a binary integer...............................................................8-2
Binary integer arithmetic....................................................................8-3
To add, subtract, multiply, or divide two binary integers To find the negative of a binary integer To convert a binary integer to a different number base
To convert a binary integer to a real number.............................8-4
To convert a real number to a binary integer.............................8-4
Using Boolean operators ....................................................................8-5
Manipulating bits and bytes ..............................................................8-6
........................................
.........
......................................
............
8-1
6-3
6-4 6-5
7-3
8-3 8-3 8-4
Contents
Page iii
Chapter 9: Lists and Sequences 9-1
Creating Lists....................................................................................... 9-1
To enter a list from the keyboard.................................................9-1
To assemble a list from a set of stack objects ...............................9-1
To append a new object to the beginning of a list ....................9-1
To append a new object to the end of a list
...............................
9-2
List Processing......................................................................................9-2
To apply a one-argument command to each element in a list ....9-2
To add corresponditrg elements of two lists To concatenate two lists
................................................................
................................
9-4 To subtract, multiply, or divide
corresponding elements of two lists............................................9-4
Applying a fimction or program to a list ...........................................9-5
To run a program or execute a function on lists To apply a procedure sequentially to elements of a list To execute a function on every element of a list
..........................
.............
.........................
List Manipulations...............................................................................9-7
Sequences..............................................................................................9-9
To generate a sequence .................................................................9-9
To find the sum of the elements in a finite list ........................9-10
To find the product of the elements in a finite list To find the set of first differences of a finite sequence
..................
...........
9-10 9-10
Chapter 10: Advanced plotting options 10-1
Labelling and relocating the axes....................................................10-1
To label the coordinate axes with the variable names
To label the axes with user-defined labels................................10-2
To have the axes intersect at a point other than (0,0)
Plotting programs..............................................................................10-3
Plotting range vs. display range
......................................................
To check the cuiTent size of PICT .....................................................10-4
To change the size of PICT..........................................................10-4
To use computed values for plotting or display ranges ................10-5
Saving and Restoring Plots ..............................................................10-6
To save the cuiTent plot picture in a variable To view a plot picture stored in a variable
............................
.................................
To save a reconstructable version of the current plot To reconstruct a plot from its stored version
...........................
.............
...............
...............
10-1
10-2
10-4
10-6 10-7 10-7
10-8
9-3
9-5 9-5 9-6
Page iv
Contents
Chapter 11: Memory 11-1
How memory is structured..............................................................11-1
Accessing port contents
....................................................................
11-2
Backup objects....................................................................................11-2
Backing up and restoring HOME ...............................................11-3
Storing and deleting backup objects
..........................................
11-4
Using data in backup objects............................................................11-4
Library objects ...................................................................................11-5
How the HP 49G manages memory
...............................................
11-7
Port 0 .............................................................................................11-7
Port 1 .............................................................................................11-7
Port 2 .............................................................................................11-7
To list a port’s contents, and find free memory
..............................
11-8
Chapter 12: Date and time arithmetic 12-1
Date and time formats
To set the format of the date and time........................................12-1
Date and time tools ...........................................................................12-2
Displaying the Time menu To copy the date to the stack or history
To copy the time to the stack or history......................................12-2
Calculating with dates
To add days to a given date .......................................................12-3
To subtract days from a given date To determine the number of days between two dates
Calculating with times .....................................................................12-4
To convert decimal time to HMS format To convert a time in HMS format to decimal format
To add times in HMS format......................................................12-5
To subtract times in HMS fonnat...............................................12-5
System time ........................................................................................12-6
To display system time................................................................12-6
To convert system time to HMS time .......................................12-6
To calculate elapsed time in seconds.........................................12-7
......................................................................
........................................................
.....................................
......................................................................
..........................................
.............
..................................
..............
12-1
12-2
12-2
12-3
12-3
12-4
12-4
12-5
Contents
Page V
Chapter 13: Customization 13-1
Creating menus..................................................................................13-1
To create a custom menu
To display a custom menu..........................................................13-2
Customizing the keyboard
User mode ........................................................................................ 13-2
To activate user mode..................................................................13-2
Assigning user keys.....................................................................13-3
Disabling keys...............................................................................13-4
Recalling and editing user key assignments
............................................................
.........................................................
...........................
13-1
13-2
13-5
Chapter 14: Computer Algebra Commands 14-1
Computer algebra command categories.........................................14-3
Algebra commands......................................................................14-3
Arithmetic commands.................................................................14-3
Calculus commands ....................................................................14-4
Exp and Lin conunands ..............................................................14-4
Matrix-related commairds
Symbolic solve commands..........................................................14-4
Trigonometry commands ...........................................................14-5
Alphabetical conunand list ..............................................................14-6
.........................................................
14-4
Index 1-1
Page vi
Contents
Preface
This guide contains infomiation on the advanced fimctionality of the HP 49G. It is a supplement to the Pocket Guide and User’s Guide that is
shipped with the HP 49G.

Material covered

This guide contains the following information:
Chapter 1, Entering commands contains information on the
different ways that you can enter and use commands.
Chapter 2, System flags contains information on using the HP 49G’s
flags, and the conunands to control them.
• Chapter 3, Command line operations illustrates how to use the
command line editor.
• Chapter 4, The stack explains how to operate the calculator in RPN
mode, and how to manipulate objects on the stack.
• Chapter 5, Matrices and linear algebra describes advanced matrix
operations, and how to solve linear algebra problems using matrices.
• Chapter 6, Unit objects contains infonnation on using the Units
application to work with units in mathematical operations.
Chapter 7, Constants library contains information on the library of
physical constants that you can access and use in calculations.
Chapter 8, Number bases contains information on working with
binary, octal and hexadecimal number bases, and working with binary integer arithmetic.
Chapter 9, Lists and sequences contains information on creating
and working with lists and sequences.
Chapter 10, Advanced plotting options provides additional
information on creating and manipulating plots.
Chapter 11, Memory contains information on storing and retrieving
data, using library objects, and how the HP 49G manages memory.
Chapter 12, Date and time arithmetic describes how to work with
dates and times.
Chapter 13, Customization describes how to customize the
keyboard, and how to create menus.
Preface
Page vii
• Chapter 14, Computer algebra commands describes each of the
computer algebra commands that the calculator contains, and what each command does.

The HP 49G documentation set

The HP 49G docmnentation set is a mixture of hard copy documentation and documentation available from the HP Calculators web site.
You can find all of the documentation for the HP 49G on the HP Calculators web site, at the following address:
http://www.hp.com/calculators/graphing/49g_info.html
The HP 49G documentation set is made up of the following components:
User’s Guide, available witli the calculator.
Pocket Guide, available with the calculator. « Advanced Topics, being chapters 1 to 13 of this manual, and available
from the web site.
® CAS Commands, being chapter 14 of this manual, and available from
the web site. ® Other Commands A to F, available from the web site. ® Other Commands G to P, available from the web site. ® Other Commands Q to Z, available from the web site.
NOTICE
This manual and any examples contained herein are provided as is and are subject to change without notice. Except to the extent prohibited by law, Hewlett-Packard Company makes no express or implied wairanty of any kind with regard to this manual and specifically disclaims the implied warranties and conditions of merchantability and fitness for a particular purpose and Hewlett-Packard Company shall not be liable for any errors or for incidental or consequential damage in comiection with the furnishing, performance or use of this manual and the examples herein.
© Hewlett-Packard Company 1999. All rights reseiwed.
Page viii
Preface
Chapter 1 Entering commands
There are a ramrber of ways you can enter a command:
• by pressing the key or keys for the command
• by selecting the command from a subject-specific menu ® by selecting the command from the command catalog
• by typing the command on the command line.

Keyboard entry

The most commonly needed commands can be entered directly from the keyboard by pressing one or two keys. For example, to enter the SIN command, press the See chapter 1 of the User’s Guide for an explanation of each key on the HP 49G keyboard.
(SIN)
key; to enter the LOG command, press (r)(iog).

Subject-specific menus

The HP 49G provides a number of menus that list just those commands relevant to a specific topic.
For example, all the programming commands are collected together on the programming menu. You access this menu by pressing I
Other subject-specific menus include a: ® math menu (0 (MTH)) ® symbolic solve menu (0 (SSg)) ® exponential and logarithm menu (0 (B(M)j ® trigonometry menu (0 (HG)) ® calculus menu (0 (0£)) ® algebra menu (0 (ALG)) ® matrices menu (0 (MMIS)j ® statistics menu (0 (SW)) ® convert menu (0 @3))

Entering commands

Page 1-1
units menu i arithmetic menu i complex number menu (0 SEE)) base menu (0 {№
Tliese subject-specific menus have keys allocated to them on the keyboard.
There are many other subject-specific menus. For example, the math menu and the various Computer Algebra System sub-menus can be selected from the Applications menu:
1. Press ®. The Applications menu is displayed.
2. Press ®. The last page of the Applications menu is displayed.
3. Highlight the menu you want—math or CAS—and press OK or (ENTER) Both menus are made up of several sub-menus, each listing the
commands of relevance to a particular area of mathematics.
The symbolic menu (displayed by pressing
(SYMB)j
provides a series of sub menus each listing the more conunonly used commands of relevance to a particular area of mathematics: algebra, arithmetic, calculus and so on.
Sub-menus
Some entries on a subject-specific menu are shortcuts to sub-menus. For example, pressing 0(MTH) displays the math menu. The first item on the math menu is vector. The two periods after the word vector indicates that there is a imtlier menu. This further menu lists conunands of relevance to vector mathematics (such as
ABS, dot, cross, etc).
Page 1-2
RfiD
HATH HEnu
iHOH
a.HRTRiK..
3.LIST.. H.HVF'ERfOLICS..
5.RERL.. e.EfiSE..
Entering commands
Entering a command From a sub-menu
With the main menu displayed, highlight the name of the sub-menu.
1
You can do this by:
® pressing ® imtil the sub-menu name is highlighted or
• pressing the number key that corresponds to the number of the sub-menu. For example, to highlight the REAL sub-menu in the above example you could press 5.)
2.
Press OK or
(ENTER).
The sub-menu is displayed.
3. Highlight the name of the command you want to enter. You can do this by:
® pressing @ rmtil the command name is highlighted or
• pressing the number key that corresponds to the number of the command.
4. Press OK or (EN If you are working in algebraic mode, the command you selected appears
on the command line ready for you to specify arguments. If you are working in RPN mode, the result of the conunand appears on
the stack.

Entering a command from a Function key menu

A subject-specific menu can take the form of a choose list (as described in the previous section) or a frmction key menu. A fmiction key menu is one that appears across the bottom of the screen, with items chosen from the menu by pressing the corresponding function key: (£1) to (£6).) This is
explained in chapter 2 of the User’s Guide.
Entering commands Page 1-3
Command catalog
The HP 49G provides a single choose list that contains all its commands. This is called the command catalog.

Displaying the command catalog

1. Press A choose list is displayed. This is the
command catalog.
RAD
CATAlD(i: 6S3 CtiHHADDS
■ :hoh
K
HCH
¿1
2. Locate the command that you want to enter. (See the next section.)
isnsiKn
3. Press OK or (MS)­If you are working in algebraic mode, the command you selected
appears on the command line ready for you to specify arguments.
If you are working in RPN mode, the result of the conunand appears on the stack.

Locating a command in the command catalog

There are two ways to locate a conunand in the command catalog; ® by scrolling ® by searching on the first character or first few characters of the
command.
Scrolling through the catalog
To scroll through the command catalog, press the (3 or (a) keys. Keep doing so until the command you want is highlighted.
You can use the shift keys in conjimction with the arrow keys to scroll more quickly through the catalog. For example:
0® displays the last command in the catalog 0® displays the first conunand 0® displays the next page of commands 0® displays the previous page of conunands. The niunber of commands displayed per page is determined by flag -90.
When set—which is the default—the commands are displayed in the mini font. This gives you six conunands per page. If flag -90 is cleared, the
Page 1-4
Entering commands
commands are displayed in your currently selected system font. If, for example, you have chosen System 8 as your current system font, you will see only four commands per page.

Searching For a command in the command catalog

The majority of commands can be selected from the command catalog by searching on the first character of the command’s name.
1. Press the keys for the first character—or first few characters—of the command’s name.
For example, to find tire HALFTAN command, type (SM) H or (EES (M) HA.
The first command with a name starting with the letter or letters you typed will be highlighted.
2. If the conunand you want is not highlighted, press @ imtil the command is highlighted.
Note that the first character of a command’s name may be:
• an upper-case character (for example, SIN)
• a lower-case character (for example, rref), or ® a symbol (for example —>TAG).
The type of the first character determines the best way to search for the command.
Upper case: if the command you want to find begins with an upper-case
letter, you must press
(ALPHA)
before pressing the key for that letter. If you intend to search by typing the first few characters of the command name, you will need either to:
• hold the (MA) key down while you key all the characters, or ® lock the alpha keyboard before you type the characters.
Lower case: if the command you want to find begins with a lower-case
letter, you must press
(ALPHA)©
before pressing the key for that letter. For
example, pressing (MlA)© R displays the rpm conunand.
Non-alphabetic characters: if the command you want to find begins with a
non-alphabetic character, press the keys for that character. For example, to search for ^TAG, type 00. The first command with a name that
starts with ^ is displayed. (In this example, you need to press ® until ^TAG is highlighted.)
Entering commands
Page 1-5
While the alpha keyboard is active, you can also search for a command that begins with a special character by typing that character and then one or more of the next alphabetical characters.
The keystrokes for non-alphabetic characters can be fomid in the Characters catalog. For example, the keystrokes for Z are 0 and S. Therefore, to search for the E+ command in the command catalog, you display the catalog and press 0 S.
The Characters catalog- accessed by pressing
'—is explained in
chapter 2 of the User’s Guide. Note that you can import additional commands from third-party
conunand libraries. When a library is attached, the commands in the library will appear in the conunand catalog. If any such conunand begins with a character that is not available directly from the HP 49G keyboard, you will not be able to search for the command.
Typing commands
In addition to selecting a command from tire conunand catalog or from a menu, you can also enter a conunand by typing its name on the conunand line.
For example, to factorize an expression while in algebraic mode, you could:
1. type igP0(IPHA)FACTOR00
2. enter the expression
3.
press
To factorize an expression while in RPN mode, you could:
1. enter the expression onto level 1 of the stack
2. type
3. press (ENTER).
(ENTER).
(SMldPHA)
FACTOR
Every command found in the command catalog can be entered directly from the keyboard.
Some conunand names contain special characters (for example, ^ and Z). The Characters catalog—accessed by pressing
0¡CHARS)
and explained in chapter 2 of the User’s Guide—shows the keystrokes needed to enter special characters.
Page 1-6 Entering commands
Chapter 2
System Flags
System flags provide you with some control over how the HP 49G behaves and displays infomiation. For example, by setting flag the alpha keyboard by pressing
-60
retimrs the mode to its default setting (where
(SM)
once rather than twice. Clearing flag
twice to lock the alpha keyboard).
-60,
you can lock
(IPHA)
must be pressed

Displaying system Flags

02 Constint ■ * 5yHb
1.
Press
(MODE)
to display the Calculator
Modes input form.
2.
Press FLAGS. The System Flags list is displayed. A tick
to the left of a flag number indicates that the flag is set. If the space to the left of a flag number is empty, the flag is clear. Fi'om this screen you can set or clear any flag in the list.
The System Flags list is not a list of all the system flags. As a general rule, flags that are likely to be changed often can be set or cleared on various input forms, where they are more readily accessible. Flags that will rarely be changed are listed in the System Flags list.
For example, flag -95 deteraiines whether the calculator is in algebraic or RPN mode. As this is a flag that many users are likely to want to change from time to time, it is accessible from an input form; the Calculator Modes input fonn (described in chapter 2 of the User’s Guide}. Because it is accessible from an input fonn, flag -95 is not listed in the System Flags list. (There are some exceptions to this general rule, with some flags accessible both from an input form and from the System Flags list.)
All the system flags—not just those on the System Flags list—are listed and described in the HP 49G Pocket Guide.
03 Function ■+ iyMb
IH P<3yH«rit ifid
13 ,4J,i2 ■ + uictc-r 20 Un-3«i-F U->H 0
21 0M.grFU.H -«• ±5EH?5___________+
System flags
Page 2-1

Setting and clearing Flags

Method 1

Use this method only if the flag you want to change is listed in the System
Flags list.
1. With the System Flags list displayed, higlilight the flag that you want to set or clear.
You can do this by either:
® pressing the ® or ® keys imtil the flag you want is highlighted or
• typing the first digit of the number of the flag. See the previous section for instructions on displaying the flags.
2. Press CHK.
If the flag was set before, it is cleared; if it was clear before, it is now
set.
3. Press OK or (ENTE^ to return to the Calculator Modes screen and OK or (ENTER) again to return to yom default screen.

Method 2

If you know the number of the system flag you want to change, you can
change the flag from the command line. The syntax you use depends on
the operating mode you have chosen: algebraic or RPN. In algebraic mode, the syntax is:
commandijlag)
In RPN mode, enter the flag on the first level of the stack and then enter the appropriate command. The command for setting a flag is SF and the command for clearing a flag is CF. (The flag commands are described on page 2-4.)
For example, to set flag -40 in algebraic mode, you enter SF(-40) and press (ENTER). In RPN mode, you enter -40 onto level 1 of the stack, enter SF
onto the command line and press (ENTER).
Similarly, to clear flag ^0 in algebraic mode, you enter CF(-40) and press
(ENTER). In RPN mode, you enter -40 onto level 1 of the stack, enter CF onto
the command line and press (ENTER). You can use this method to set and clear all flags, not just those listed on
the System Flags list.
Page 2-2
System flags

Setting or clearing several Flags at once

In algebraic mode, the syntax is:
command^llist}')
In RPN mode, enter a list of the flags you want to set or clear on the first
level of the stack and then enter the appropriate command.
For example, to set flags -19 and-40 in algebraic mode, you enter SF({-19,-401) and press
1 of the stack, enter SF onto the command line and press
(ENTER).
In RPN mode, you enter {-19 ^0} onto level
(ENTER')
. (Note that in algebraic mode, you must enter a comma between the elements in a list. In RPN mode, you can enter a comma or a space.)
Similarly, to clear flags -19 and-40 in algebraic mode, you enter CF({-19,-40j) and press level 1 of the stack, enter CF onto the command line and press
(ENTER).
In RPN mode, you enter {-19 -40{ onto
(ENTER).

Method 3

The flags that you are likely to need to change can be changed from
various input fonns (as explained on page 2-1). To change one of these
flags, display the appropriate input fonn, place the cursor in the flag field and press CHK. If the flag was set before, it is cleared; if it was clear before, it is now set. (A tick mark in the field indicates that the flag is set.)
Examples of flags that can be set from input forms include operating mode, number format, angle measure, coordinate system, beep, key click, keep last stack, textbook mode, and clock type. These, and numerous other flags, are accessible by pressing
(MODE).
Editing input forms is described in detail in chapter 2 of the User’s Guide.
System flags
Page 2-3
Flag commands
The flag commands are listed and explained in the table below. The flag commands enable you to set and clear flags as well as having a value returned that indicates the status of a specified flag: 1 if the flag is set, 0 if the flag is clear.
Command
SF
CF
FS?
FC?
FS?C
!FC?C
Sets the specified flag.
Clears the specified flag.
Returns true (1) if the specified flag is set and false (0) if the flag is clear.
Returns true (1) if the specified flag is clear and false (0) if the flag is set.
Tests the specified flag, returns true (1) if it is set or false (0) if it is clear, and then clears it.
Tests the specified flag, returns true (1) if it is clear or false (0) if it is set, and then clears it.
Table 2-1 Flag commands
Description

User Flags

You can also apply the conunands listed in the table above to user flags. (User flags are mainly used in programming.)
User flags are positive numbers, while system flags are negative numbers. (In the System Flags list—discussed on page 2-1—the system flags are shown as positive munbers. However, when you are setting, clearing, and testing system flags, you must specify the flag as a negative number.)
You have access to 128 user flags. You can set, clear, and test them the same way as with system flags. For example, to clear flag 25 that your
program has set, you issue the command CF(25).
Page 2-4
System flags
Chapter 3 Command line operations
The command line is where you enter and edit conunands and objects. The HP 49G provides numerous tools to assist you when working on the conunand line. Some of these tools have their own key; others can be selected from the command line editor’s Tool menu.

Activating the command line

The way you activate the command line depends on whether you intend to create a new object or edit an existing object.
To create a new object, just start typing. The command line is activated as soon as you start. (While you can create most objects from the conunand line, many objects are best created using specific applications. For example, it will usually be easier to create an expression using Equation Writer, or a matrix using Matrix Writer.)
To edit an existing object on the command line, select the object from history or from the stack and:
® in algebraic mode, press (ENTER) ® in RPN mode, press EDIT.
Note that pressing EDIT in algebraic mode activates whatever application is best suited to editing the type of object you selected, not the command line editor. For example, if you selected an expression, pressing EDIT activates Equation Writer. To edit the object on the command line, you must press

Command Line operations Page 3-1

Positioning the cursor

Wlien editing the object on the command line, you will almost always need to reposition the cursor.

Main methods: single-line command line

Press @ or ® to move the cursor left or right respectively.
To go directly to the last chai'acter on the command line, press or
0
®.
To go directly to the first character on the command line, press 0® or
0
®.

Main methods: multi-line command line

In multiline entries—for example, blocks of progranmring code—press ®
or ® to move the cursor to the previous or next line respectively. To go directly to the end of the last line, press 0®. To go directly to position x in the last line, where x is the number of
characters the cmsor is from the start of the cuiTent line, press 0®.
To go directly to the start of the first line, press 0®. To go directly to position x in the first line, where x is the number of
characters the cursor is from the start of the current line, press 0®.
Page 3-2
Command line operations

Helpful commands and sub-menus

Like all other HP 49G applications, the command line editor has its own Tool menu. This menu is displayed by pressing line is active (that is, while the cursor is blinking). You then select a command by pressing the corresponding fmrction key.
The conunands that provide ways of positioning the cursor are:
(TOOp
while the command
-SKIP
SKIP^
^BEG
—^END
GOTO
Moves the cursor to the beginning of the current word (that is, to the beginning of the word in which the cursor is currently placed). If pressed again, the crnsor moves to the beginning of the previous word if there is one.
Moves the cursor to the beginning of the next word (or to the end of the word if there is no next word).
Moves the cursor to the begimiing of the selection or, if nothing is selected, to the beginning of the command line.
(In multiline entries, the beginning of the command line is
the beginning of the first line of the entry.) Moves the cursor to the end of the selection or, if nothing
is selected, to the beginning of the command line. The GOTO menu provides three useful commands: Go to line: this command sends the cursor to the start of
the line whose number you specify.
Go to position: this command sends the cinsor to the
position you specify (being the specified number of
characters—including spaces—from the start of the command line).
See “Command line infonuation” on page 3-12 for instructions on how to find tlie position of a character on the command line.
Command line operations
Labels: this displays a list of labels in the object on the
command line. If you highlight a label in the list and press
OK or (ENTER). the cursor is sent to the start of that label.
A label is any string of characters that begins with an asterisk. Labels are particularly useful in programming code, where they can be used to name discrete blocks of code.
Page 3-3
FIND The Find command is on the Search sub-menu. You can
use this command to send the ciu'sor to the character or character string you specify. See “Find” on page 3-8 for more information.

Selecting characters

The HP 49G provides a number of commands that work on selected text (such as copy and cut). To select characters, you mark the beginning of
the selection and the end of the selection.
1. Position the cursor at the beginning of your selection. See “Positioning the cursor” on page 3-2 for a description of various
ways to position your cursor.
2. Press©®.
3. Position the cursor at the end of your selection.
4. Press ©(END). Your selection is now highlighted.
Pressing)©'(ENQ without first pressing (©(BEGIn) causes all
charactei’s to the left of the cursor to be selected. Therefore, if
you want to select all characters to the left of the cursor, press
at step 2 above and ignore the remaining steps

Copy, cut, and paste

1. Select the characters that you want to copy or cut. This is explained on page 3-4 (and in chapter 3 of the User’s Guide if
you are selecting parts of an expression in the Equation Writer).
2. Do one of the following:
® to copy the characters, press
® to cut the characters, press
3. Position your cursor where you want to paste the characters you have copied or cut.
See “Positioning the cursor” on page 3-2 for a description of ways to
position your cursor.
4. Press !
Page 3-4
or
Command line operations

Editing the command Line

Deleting characters

The simplest way to delete a character is to position the cm'sor to the immediate right of the character and press @-
Other ways of deleting characters are provided by commands on the Tool menu for the command line editor. The menu is displayed by pressing
when the command line is active. These commands are:
^DEL
0^DEL
DEL—y
0DEL^
DELL
REPLACE
Deletes the characters from the cursor to the beginning of the current word (that is, to the beginning of the word in which the cursor is currently placed). If pressed again, the entire previous word is deleted if there is one.
Deletes all characters from the cursor to the start of the line.
Deletes the characters from the cursor to the beginning of the next word (or, if there is no next word, to the end of the current word).
Deletes all characters from the cursor to the end of the line.
Deletes all characters on the current line. There are vaiious replace options on the Search menu.
These options enable you to search for the characters you want to delete and replace them with nothing, thereby deleting those characters.
The replace options are discussed on page 3-8.
Command line operations
Page 3-5

Inserting characters

By default, any character you enter on the command line will be inserted between the characters on either side of the cursor. To replace characters rather than insert them, you de-activate insert mode. Each character you enter will then replace—that is, overwrite—the character directly below
the cursor.
To de-activate (or activate) insert mode:
1. With the conunand line active, press (TOOp.
fiSP KVZ HEK R= 'K'
tHPHEi
____
2. If the INS conunand is not displayed, press
imtil it is.
A small square to the right of the 4582.365
___________________
coimnand s label—as in the example on tire right—indicates that insert mode is active.
The shape of the cursor also indicates whether you are in replace mode (ciffsor is a left-pointing arrow) or insert mode (cursor is a filled rectangle).
Press INS to switch insert mode on off or on.
3.

Editing complex objects

In many cases you will find the methods outlined in the previous two sections well-suited to editing command line objects. However, when you need to edit a complex object, you might find it easier to isolate just that part of the object you want to edit. To do this, make sure that the Tool menu for the conurrand line editor is displayed. (Press (TOOp if it is not.)
1. Select tire part of the object that you want to edit. See “Selecting characters” on page 3-4 for instructions.
2. If the EDIT command is not displayed, press (MD imtil it is.
3. Press EDIT. Your selection now appears on tire command line by itself The rest of
the object has not been deleted; it is just not visible while you edit yoiu' selection.
4. Edit the entry on the coirurrand line.
5.
Press
(ENTER).
The object you started with is redisplayed, showing the changes you made at step 4 above.
Page 3-6
Command line operations

Evaluating components oF the command line

If there is a component of your object that could be evaluated—such as a mathematical expression—^you can select the component and evaluate it. The result of tlie evaluation replaces the component.
To evaluate a component, make sure that the Tool menu for the command line editor is displayed. (Press (TOOp if it is not.)
1. Select the component of the object that you want to evaluate. See “Selecting characters” on page 3-4 for instructions.
2. If
the
EXEC
command is not displayed, press (NXT) until it is.
3. Press EXEC. The component is evaluated, if possible, and the result replaces the
component.

Suspending editing

You can suspend editing the command line and return to it later, performing other operations in the meantime. To do this, make sure that the Tool menu is displayed. (Press (TOOD if it is not.)
1. If the HALT command is not displayed, press (RED until it is.
2. Press HALT. Your default screen is redisplayed. You can now use the calculator to
perform other operations.
While you have an editing session suspended, the annunciator HLT appears in the status area of yoiu' default screen (providing that you have not hidden the status area).
3. Press 0 {®® to return to the conunand line you earlier suspended.
You will notice that the contents of the command line have not been affected by the operations you perfoimed since suspending editing.
While you have one command line editing session suspended, you can suspend another. In fact, you can suspend any iiuiiiber of command line editing sessions.
Mien you have more than one editing session suspended, pressing HCoRrj returns you to the most recently suspended session. Pressing (0(@) again returns you to the second most recently suspended session, and so on.
Command line operations
Page 3-7
Loading...
+ 169 hidden pages