Go

From BR Wiki
Revision as of 15:32, 26 December 2011 by Mikhail.zheleznov (talk | contribs) (Imported GO command page from old wiki and added new syntax diagram)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
                                                                                Go (G)

The Go command resumes execution of a program or procedure file after execution has been paused.

Comments and Examples

GO can resume execution of a program at any line. All variables keep their current values; open files stay open.

The following example resumes execution at line 1350 and sends TRACE output to the printer:

GO TRACE PRINT 1350

Syntax

Defaults

  1. Send TRACE output to the screen.
  2. Resume at the point that the interruption occurred, or in the case of an error, retry the statement.

Parameters

The optional RUN parameter clears prior STEP and TRACE settings before establishing new settings. The following command clears STEP and TRACE, then sets TRACE on again:

GO RUN TRACE
STEP directs BR to pause before executing each program statement that causes an action. A line number field in the status line tells you the number of the line to be executed next. When you press <CR>, that line is executed and the next line number appears. This option can be helpful when you are debugging a program, as it allows you to follow the flow of the program closely.
The command RUN STEP NORESTORE suppresses the restoration of the screen after the initial restoration.
The command RUN STEP RESTORE causes the application screen to be refreshed before processing each execution step. GO RUN does not reset the NORESTORE option.
TRACE also displays line numbers on the screen, but it does not cause BR to pause before executing each program line.
PRINT sends the output of the TRACE parameter to an attached printer; it works only when the TRACE parameter is on.

The optional parameters NOSTEP and NOTRACE turn the STEP and TRACE options off.
Line number tells BR which line to resume executing the interrupted program from.

Technical Considerations

When GO is used to restart program execution after an error, BR retries execution from the statement at which the error occurred.

GO STEP processing

1) When GO STEP is executed on a terminal with only 24 lines, BR now displays the current line number in positions 41-45 of line 23.
2) The STEP mode function keys (F1-F4) have been reassigned from 'Ctrl+F1 -> Ctrl+F4' to 'Shift+F1 -> Shift+F4'.
Extended Function Key [Shift+F1 - Shift+F4] Stepping
  • Shift+F1 Step Into Clause- Processes only the next clause.
  • Shift+F2 Step Over Clause - Processes the next clause plus all routines called by it.
  • Shift+F3 Step Into Line- Processes up to the next line number encountered.
  • Shift+F4 Step Over Line- Processes the next line plus all routines called by it.

Note Shift+F1 -Shift+F4 increases Fkey number as scope of step increases.

3) In STEP mode GO indicates GO RUN. Enter indicates GO STEP.
4) The GO command now accepts a period (.) followed by a line number to indicate that processing is to continue until the specified line, and then a STEP interrupt is to be issued. If a period without a line number is specified on the GO command, the previous breakpoint line for that program will be used.

For example, a program is stopped with Ctrl-A and the following command is issued:

 GO .5280

The program will continue from where it left off until statement 5280 is about to be executed. Then a STEP interrupt is issued. If the following command is then issued, the program will continue until statement 5280 is encountered again and stop as before:

 GO.

If a GO command is issued with no period, breakpoint processing is canceled and processing continues normally.