Flow-control structures: Difference between revisions
Content added Content deleted
(→{{header|C}}: + AWK) |
m (→{{header|AWK}}: fixed italic markup) |
||
Line 108: | Line 108: | ||
=={{header|AWK}}== |
=={{header|AWK}}== |
||
Awk has ''break'' and continue'' for loop control, as in C. |
Awk has ''break'' and ''continue'' for loop control, as in C. |
||
<lang awk$ awk 'BEGIN{for(i=1;;i++){if(i%2)continue; if(i>=10)break; print i}}' |
<lang awk>$ awk 'BEGIN{for(i=1;;i++){if(i%2)continue; if(i>=10)break; print i}}' |
||
2 |
2 |
||
4 |
4 |