4
for (i = 1; i <= 10; i++) print i
6
for (i = 1; i <= 10; i++) # comment 0
9
for (i = 1; # comment 1a
12
for (i = 1; i <= 10; # comment 2a
15
for (i = 1; # comment 1b
19
for (i = 1; # comment 1c
27
for (iggy in foo) # comment 5
34
for (iggy in foo) # comment 1
40
for (iggy in foo) # comment 3
44
for (iggy in foo) # comment 5
72
# comments/for_del.awk
73
BEGIN { for (iggy in foo) delete foo[iggy] }
82
while (0) # WHILE comment
101
} # rbace EOL comment
102
# rbrace block comment
103
while (1) # while comment
109
print "foo" # print comment
111
if (a) # IF comment 2
127
# comments/switch.awk
130
switch (a) # switch EOL comment
131
# switch block comment
132
{ # lbrace EOL comment
133
# lbrace block comment
134
case 5: # comment after case
137
# block comment after case
138
default: # comment after default
139
print "default" # print comment
141
} # rbrace EOL comment
142
# rbrace block comment
145
# comments2/switch.awk
148
switch (a) # switch EOL comment
149
# switch block comment
150
{ # lbrace EOL comment
151
# lbrace block comment
155
# block comment after case
156
} # rbrace EOL comment
157
# rbrace block comment
160
# comments2/switch0.awk
165
case 5: # case comment
168
default: # default comment
174
# comments2/switch1.awk
183
default: # default comment
189
# comments2/while.awk
191
while (1) # while comment
198
# comments2/while2.awk
200
while (1) # while comment
214
# comments2/function.awk
215
function baz(p1, # comment
217
# comment before braces
224
# comments/function.awk
225
function funny(param1, # param comment 1
226
param2, param3, # param comment 2
228
# Comment between header and body
229
{ # lbrace EOL comment
230
# lbrace block comment
232
} # rbrace EOL comment funny
233
# rbrace block comment funny
235
# comments/function2.awk
236
function funnyhaha(param1,
239
{ # lbrace EOL comment
240
# lbrace block comment
242
} # rbrace EOL comment funnyhaha
243
# rbrace block comment funnyhaha
245
# comments/callcoma.awk
246
function callme(a, b, c)
248
printf("a = %s, b = %s, c = %s\n", # format comment
255
callme(1, # 1 comment
261
/foo/, # range comment
270
@load "filefuncs" # get file functions
273
stat("/etc/passwd", data)
280
if (a && # and comment
286
# comments/qmcol-qm.awk
294
# comments/qmcol-colon.awk
302
# comments/qmcolboth.awk
310
# test beginning of line block comments (com2.awk)
312
print "hi" # comment 1
317
print "hello" # comment 3