bug-gawk
[Top][All Lists]
Advanced

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

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


From: Sebastian Carlos
Subject: Docs: Clarify that accessing field beyond the last one throws lint warning.
Date: Mon, 12 Jun 2023 17:36:01 +0200

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]