MAINDEBUG User's Guide, Chapter 5

previous   next   top   complete contents   complete index   framed top   this page unframed


5. Editing Commands

Except as noted, these commands are available only in the line-oriented interface.

For the purposes of this chapter, words in source text are composed of visible characters and are separated by spaces and tabs. Commands that usually display a cursor do not do so if there are no words on a line, i.e., if the line is blank.

5.1. Moving Down: {n}D

The D command moves the cursor down n lines.

The cursor is positioned at the beginning of the first word on the line.

5.2. Setting File Context: Fs

The F command sets the debugger file context to the file named s.

The current source file, if any, is closed, and the file context is set to s. The debugger context is otherwise unaffected. The cursor is positioned at the first word in the file. The file s need have no particular relationship to any MODULE being debugged, though it usually contains (some of) the source text of a debuggable MODULE. This command may also be used with the display debugger interface.

In the line-oriented interface, if s is not specified, the current file is closed and the file context is cleared.

5.3. Moving to Page and Line: {p}{.n}G, +{n}G, and -{n}G

The G command moves the cursor to the specified page and line.

The cursor is positioned to the first word of the specified line and/or page. There are several forms of the command:

Form Position Cursor At
G Top of next page
+nG Forward n pages, top line
-nG Backward n pages, top line
pG Top of page p
.nG Line n of current page
.G Top of current page
p.nG Line n of page p

5.4. Listing Lines: {-}{n}L

If - is not present, the L command lists n lines starting at the current line; if - is present, it lists the n lines before the current line and the current line.

5.5. Moving to a File Position: Pn

The P command puts the cursor at position n in the current file.

n is a LONG INTEGER constant (no trailing L).

5.6. Moving Up: {n}U

The U command moves the cursor up n lines.

The cursor is positioned at the beginning of the first word on the line.

5.7. Displaying a Window of Lines: {n}W

The W command displays a window of n lines centered about the current line.

If n is omitted, a default amount is displayed.

5.8. Moving Left: {n}<

The < command moves the cursor left n characters on the current line.

5.9. Moving Left by Words: {n}(

The ( command moves the cursor left n words on the current line.

5.10. Moving Right: {n}>

The > command moves the cursor right n characters on the current line.

5.11. Moving Right by Words: {n})

The ) command moves the cursor right n words on the current line.

5.12. Searching for a Character: {n}{-}'c

The ' command searches the current line for the nth occurrence of the character c.

The search starts at the current cursor position. If - is present, it searches backward (to the left); otherwise, it searches forward (to the right).

Case is not distinguished in the search character.

5.13. Searching for a STRING: {n}{-}"{s"}

The " command searches the current file for nth occurrence of the STRING s.

If - is not present, the remainder of the current file is searched, starting one character position past the current cursor position, for the nth occurrence of STRING s. A double quote character in s must be doubled, as in a MAINSAIL STRING constant. The terminating quote may be omitted if no additional commands are given on the line.

Case is not distinguished in the search STRING.

If - is present, the command searches backwards towards the beginning of the file, starting at one character before the cursor.

If s (and the trailing double quote) is not specified, the previous search STRING is used. For example, a command line consisting of a quote all by itself searches for the most recently used search STRING. To continue the search for the next occurrence of the STRING, it is sufficient to type <eol>, since that repeats the previous command.


previous   next   top   complete contents   complete index   framed top   this page unframed

MAINDEBUG User's Guide, Chapter 5