[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Possible bug in gawk 4.1.3 running in cygwin OS Windows 7
From: |
arnold |
Subject: |
Re: [bug-gawk] Possible bug in gawk 4.1.3 running in cygwin OS Windows 7 Ultimate SP 1 |
Date: |
Wed, 08 Feb 2017 11:11:26 -0700 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
Looks like Andy got it. Thanks. I am tired so I didn't see it.
Arnold
"Andrew J. Schorr" <address@hidden> wrote:
> Hi,
>
> On Wed, Feb 08, 2017 at 01:38:41PM +0000, Christopher Durant wrote:
> > This function causes the interpreter to go into what I can only describe as
> > a spasm.
> >
> > function datetime()
> > {tag = (strftime ("%Y-%m-%d") " " (strftime("%r"));
> > return tag;
> > }
> >
> >
> > It fails to pass Go reporting:
> >
> > gawk: test2ver5.awk:36: {tag = (strftime ("%Y-%m-%d") " "
> > (strftime("%r"))
> > gawk: test2ver5.awk:36:
> > ^ unexpected newline or end of string
> >
> > It then snags every subsequent line in the program with "unexpected
> > newline" and "syntax error".
>
> I'm afraid you have an extra parenthese before the 2nd strftime. Please
> try this instead:
>
> function datetime()
> {tag = (strftime ("%Y-%m-%d") " " strftime("%r"));
> return tag;
> }
>
> In general, if the number of opening parentheses does not match the
> number of closing parentheses, you will get a syntax error. Many editors
> are able to check this for you.
>
> Regards,
> Andy