Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

gawk can't run an awk program...

30 views
Skip to first unread message

z.entropic

unread,
Apr 24, 2009, 11:59:14 AM4/24/09
to
I recently found that gawk chokes on a program that awk (MKS 9.1) has
no problem with:

FNR == 1 { PrintData() }
END { PrintData() }
[...]
function PrintData() { [...] }

gawk crashes with a message "gawk: test.awk:3: END blocks must have an
action part"

I'm not sure what that means; can't gawk accept 'function' as an
action, but awk can?

--Tony

Hermann Peifer

unread,
Apr 24, 2009, 1:09:26 PM4/24/09
to

Works fine here with gawk 3.1.5 and 3.1.6. What does gawk --version say?

Hermann

Aharon Robbins

unread,
Apr 26, 2009, 3:36:24 AM4/26/09
to
Please send me offline the program and a data file, because this sounds
really strange. Also please check your version of gawk & let me know
what system you're using, how gawk was compiled and so on. See node "Bugs"
in the gawk doc for the best way to report bugs or problems.

Thanks,

Arnold

In article <05ae69a1-32b1-461a...@k8g2000yqn.googlegroups.com>,


--
Aharon (Arnold) Robbins arnold AT skeeve DOT com
P.O. Box 354 Home Phone: +972 8 979-0381
Nof Ayalon Cell Phone: +972 50 729-7545
D.N. Shimshon 99785 ISRAEL

0 new messages