bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] On uninitialized variables


From: Manuel Collado
Subject: Re: [bug-gawk] On uninitialized variables
Date: Tue, 14 May 2019 08:45:41 +0200
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

El 13/05/2019 a las 21:11, address@hidden escribió:
Hi.

M <address@hidden> wrote:

Hello! When rereading the manual (v5.0.0), I noticed an inexact statement
in Chapter 1:

1.5 A More Complex Example

"(This works because awk variables are automatically initialized to
zero.)"

It's true only in a numeric context.
When used as strings, uninitialized variables are automatically
initialized to an empty string.
Although this peculiarity is emphasised throughout the rest of the manual,
I think it would be useful to mention about it in the introduction
chapter too (especially for novices).

Thanks for the note. Looking at the section as a whole, I think it
would be distracting to try to introduce information about initialization
to the empty string.  Sometimes it's better not to be fully complete.

So, I appreciate your making the suggestion, but I think it better to
leave that section alone.

Or just a minimal cosmetic change: "initialized to null value" instead of "initialized to zero".

Just my 2c.

Regards.
--
Manuel Collado - http://lml.ls.fi.upm.es/~mcollado




reply via email to

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