bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] PROCINFO["identifiers"], a bug


From: arnold
Subject: Re: [bug-gawk] PROCINFO["identifiers"], a bug
Date: Tue, 28 Aug 2018 23:22:21 -0600
User-agent: Heirloom mailx 12.4 7/29/08

Hello.

Thank you for taking the time to report an issue.

It's not clear to me what you think the bug is.

If it's the use of `...', that is on purpose. As far as I'm concerned
those are left and right single quotes, so the usage is purposeful.

If it's the fatal error message, gawk supports true multidimensional
arrays. PROCINFO["identifiers"] is one.  Since you can't print
an array, gawk issues the fatal error message.

Thanks,

Arnold

Petr Slansky <address@hidden> wrote:

> Hello,
>
> I found this by an accident and I think it is a bug in gawk 4.1.3 and 4.1.4
>
> $ gawk 'BEGIN {for (KEY in PROCINFO) print KEY, PROCINFO[KEY];}'
> group9 116
> ppid 22129
> pgrpid 2890
> api_major 1
> group10 1000
> api_minor 1
> group1 4
> gid 1000
> mpfr_version GNU MPFR 4.0.1
> group2 20
> egid 1000
> group3 24
> gawk: cmd. line:1: fatal: attempt to use array `PROCINFO["identifiers"]' in
> a scalar context
>
> $ gawk 'BEGIN {print "identifiers" in PROCINFO;}'
> 1
> $ gawk 'BEGIN {print PROCINFO["identifiers"];}'
> gawk: cmd. line:1: fatal: attempt to use array `PROCINFO["identifiers"]' in
> a scalar context
>
> BTW, note how error is reported, there are two different appostrofes (` &
> '), it looks like other, cosmetic, bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]