manual:chapter2:cmdline

The command line editor is an area of the screen that opens up whenever the user needs to input data on the calculator. Also, for an object already on the stack, the command line editor can be invoked using the keyboard shortcut DN (down keypad arrow).

The command line has several different modes of operation, indicated by the letter of the blinking cursor. The editor will switch between modes of operation automatically most of the time based on context. The user can manually switch by using the ENTRY key (RS-AL).

'D' - Direct mode

When a number is first pressed, the editor opens up in direct mode. In this mode, commands and operations will close the editor, compile what was typed, and perform the operation all in a single keystroke. For example typing 2 and pressing 1/X will immediately produce an answer of 0.5.

'A' - Algebraic mode

This mode is specifically designed for entering symbolic expressions. It is activated when the user types the single quotes ' ', or it can be entered into manually using ENTRY. In this mode, commands and operators will not perform their functions, but rather will insert themselves into the expression as text. For example pressing SIN in this mode will insert the text SIN().

'P' - Programming mode

This is the default mode for programming in RPL, it is activated automatically when the user enters the program delimiters « ». In this mode, functions and operators will be inserted into the editor as commands, and automatically separated with spaces. For example pressing SIN in this mode will insert the text SIN separated with spaces as needed.

'C' or 'L' - Alphanumeric mode

This is the preferred mode for entering arbitrary text. It is activated manually using AL, or automatically when the user inserts the double quotes " ". In this mode most keys will insert letters, numbers and symbols. The C in the blinking cursor stands for Capitals, and will produce capital letters. On the other hand L stands for Lowercase, and will insert lowercase letters.

To switch between C and L modes, press the AL key once. A second press of AL without pressing any other key in between will disable alphanumeric mode, and return to the previous mode. To temporarily alternate between C and L, press ALhold, and the cursor will change from C to L or vice versa. This change is only temporary while holding AL and pressing other keys. When releasing AL the mode will revert back.

Alphanumeric mode can also be used temporarily. When in any other mode, press ALhold key and the cursor will change to C or L. Without releasing AL you can type letters and symbols. Upon releasing AL, the editor will return back to the previous mode of operation, ending alphanumeric mode.

To move the cursor through the text, use the cursor keys in the keyboard. Depending on the shifts, they will perform different operations:

  • LF, RT, UP, DN: Moves one character left, right, up or down;
  • RT at the end of the line: Moves to the start of the next line;
  • RS-RT: Moves to the end of the current line;
  • RS-LF: Moves to the start of the current line;
  • RS-UP: Moves to the first line of text;
  • RS-DN: Moves to the last line of text;
  • RShold-UP: Moves up one page of text;
  • RShold-DN: Moves down one page of text;
  • RShold-RT: Moves right one page;
  • RShold-LF: Moves left one page.

When the user is typing text, the status area will offer suggestions to quickly type RPL commands based on the partial word immediately to the left of the cursor. For example, pressing the key X will insert the letter X into the editor, and immediately suggest XROOT in the status area. If the partial word typed doesn't match any RPL commands, there will be no suggestion in the status area.

When a suggestion is being displayed, the following keys become active:

  • ALhold-UP: Shows the previous suggestion;
  • ALhold-DN: Shows the next suggestion;
  • ALhold-RT: Inserts the suggestion into the editor.

The autocomplete feature works best when the editor is in programming mode P, used in combination with the temporary alphanumeric mode. For example, Press ALhold, then press C to get suggested CMP, then pressing O will suggest COPYCLIP, and finally pressing RT will insert COPYCLIP into the editor. Now you can release AL to return to programming mode.

To select text when inside the editor, use the following keys:

  • LS-LF: Defines the start of the selection at the cursor location;
  • LS-RT: Defines the end of the selection at the cursor location;
  • LShold-LF: Copies the selection to the clipboard;
  • LShold-RT: Pastes the clipboard at the cursor location;
  • LShold-DN: Cuts the selection into the clipboard.

The clipboard is also shared with the stack, so objects from the stack can be pasted into the editor and text from the editor can be pasted into the stack.

When the editor is open, the menu keys behave slightly different from their actions when at the stack. For complete information see The Vars Menu. This section has a summary of the menu workings when in the editor.

  • Most commands in the menu will insert the command name to the command line. When the editor is in algebraic mode A, some commands will be inserted as a function, including opening and closing parenthesis;
  • if the menu is showing variables, using {A/L} will insert the name of the corresponding variable in the editor;
    • when using LS-{A/L} or RS-{A/L} (which normally do STO and RCL respectively), the STO or RCL will also be inserted;
    • finally, when using RShold-{A/L} the content of the corresponding variable will be inserted as text in the editor.
  • If the menu tab is displaying a directory, the menu key will change to the directory instead of inserting its name. This allows traversing directories while editing text, transparently. The LS-UP (UPDIR) and LShold-UP (HOME) shortcuts are also active during the editing session.
  • manual/chapter2/cmdline.txt
  • Last modified: 2019/12/01 13:49
  • by jojo1973