Debian Codegraph @

test/watchpoint1.ok

raw
1 1 #! /usr/bin/gawk -f
2 2 BEGIN {
3 3 c = 0
4 4 }
5 5
6 6 /apple/ {
7 7 nr = NR
8 8 c++
9 9 # printf "[c, NR] = [%s, %s]\n", c, NR
10 10 }
11 11
12 12 END {
13 13 print c
14 14 }
15 Watchpoint 1: c
16 1: c = untyped variable
17 2: nr = untyped variable
18 3: NR = 0
19 Breakpoint 2 set at file `watchpoint1.awk', line 6
20 Starting program:
21 Stopping in Rule ...
22 Watchpoint 1: c
23 Old value: untyped variable
24 New value: 0
25 main() at `watchpoint1.awk':6
26 6 /apple/ {
27 1: c = 0
28 2: nr = untyped variable
29 3: NR = 1
30 Breakpoint 2, main() at `watchpoint1.awk':6
31 6 /apple/ {
32 1: c = 0
33 2: nr = untyped variable
34 3: NR = 1
35 Breakpoint 2, main() at `watchpoint1.awk':6
36 6 /apple/ {
37 1: c = 0
38 2: nr = untyped variable
39 3: NR = 2
40 Watchpoint 1: c
41 Old value: 0
42 New value: 1
43 main() at `watchpoint1.awk':6
44 6 /apple/ {
45 1: c = 1
46 2: nr = 2
47 3: NR = 3
48 Breakpoint 2, main() at `watchpoint1.awk':6
49 6 /apple/ {
50 1: c = 1
51 2: nr = 2
52 3: NR = 3
53 Breakpoint 2, main() at `watchpoint1.awk':6
54 6 /apple/ {
55 1: c = 1
56 2: nr = 2
57 3: NR = 4
58 Watchpoint 1: c
59 Old value: 1
60 New value: 2
61 main() at `watchpoint1.awk':6
62 6 /apple/ {
63 1: c = 2
64 2: nr = 4
65 3: NR = 5