bug-gawk
[Top][All Lists]
Advanced

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

Re: Docs: Clarify that accessing field beyond the last one throws lint w


From: arnold
Subject: Re: Docs: Clarify that accessing field beyond the last one throws lint warning.
Date: Wed, 14 Jun 2023 09:38:22 -0600
User-agent: Heirloom mailx 12.5 7/5/10

Hello.

Thanks for the note. I suppose I can add a note about this, as there
are other places in the manual that make note of lint warnings.

However, as there are close to 200 lint warnings in the code, it
doesn't make sense to document them all.

Thanks,

Arnold

Sebastian Carlos <sebaaa1754@gmail.com> wrote:

> Hello,
>
> Section "4.2 Examining Fields" of the manual says:
>
> > If you try to reference a field beyond the
> > last one (such as ‘$8’ when the record has only seven fields), you get
> > the empty string.
>
> I think it would be nice to say that doing so throws a warning when the
> linter is on:
>
> > warning: reference to uninitialized field
>
> I think this is significant because the next section of the docs even has
> an example
> that would show that warning if running it with the linter on:
>
> > awk '{ print $NR }'
>
> Thanks for your time.



reply via email to

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