next

The next command continues running the program by executing the next source line in the current stack frame, and then stops.

Syntax

next [ count ]
  1. count defines the number of lines to execute before stopping.

Usage

The next command allows you to execute your program one line of source code at a time. The next command is similar to step, but function calls that appear within the line of code are executed without stepping into the function code.

When the next line of code at the original stack level that was executing when you gave the next command is reached, execution stops.

Using a count parameter will repeat the step command count times.

After reaching a breakpoint, the next command can be used to examine a troublesome section of code more closely.

n is an alias for the next command.

Example

MAIN
    DISPLAY "step 1"
    DISPLAY "step 2"
    DISPLAY "step 3"
END MAIN
$ fglcomp -M prog.4gl && fglrun -d prog.42m

(fgldb) break main
Breakpoint 1 at 0x00000000: file prog.4gl, line 2.

(fgldb) run
Breakpoint 1, main() at prog.4gl:2
   1     MAIN
-> 2         DISPLAY "step 1"
   3         DISPLAY "step 2"
   4         DISPLAY "step 3"

(fgldb) next
step 1
   1     MAIN
   2         DISPLAY "step 1"
-> 3         DISPLAY "step 2"
   4         DISPLAY "step 3"