Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!mailrus!umix!nancy!eecae!dsacng1!nab1382 From: nab1382@dsacng1.UUCP (Dick Hauser) Newsgroups: comp.unix.questions Subject: AWK User Assistance Message-ID: <307@dsacng1.UUCP> Date: 21 Apr 88 13:06:39 GMT Organization: Defense Logistics Agency Systems Automation Center, Battle Creek, MI Lines: 28 Keywords: unix AWK assistance I purchased the book "The AWK Programming Language". Right now, I am working my way through the book. I have encountered problems with user-defined functions (Page 53). I am familiar with "C" and the bourne shell. I wrote a small AWK program which called a user-define function. Syntax errors keep occurring. { init_rpt() print $1, $2 $3 } function init_rpt { print " SAMPLE HEADER" } As a last resort, I wrote a small program like the one above, but still received errors (syntax error near xxx, bailing out near xxx). I read paragraph 2.3 (User-Defined Functions) quite a few times, and can locate the problem. Apparently, there is a syntax requirement I am not aware of. Finally, I you have a list of AWK "gotchas", I would appreciate receiving a copy. Thanks in advance - Dick Hauser D D D :