[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Gawk manual: local variables are initialized to the empty
Re: [bug-gawk] Gawk manual: local variables are initialized to the empty string
Thu, 19 Jun 2014 20:04:09 +0300
Heirloom mailx 12.5 6/20/10
> Date: Wed, 18 Jun 2014 17:47:03 +0200
> From: Hermann Peifer <address@hidden>
> To: "address@hidden" <address@hidden>
> Subject: [bug-gawk] Gawk manual: local variables are initialized to the
> empty string
> I see that there is quite some update work done around the manual.
Indeed. It's been a lot of work that is almost done.
> One thing that confused me (and maybe only me) is the above statement
> mentioned in the context of user-defined Functions, in sections 6.4 and
> "initialized to the empty string" made me believe that something like
> this happens in the background, which would make localvar a scalar
> inside the function:
> localvar = ""
> This is obviously (luckily) not the case und local variables are
> "untyped variables", as the debugger tells me.
Right. This concept is hard. I don't want to introduce into the
manual the idea of "untyped". It's a lot of work to explain, and is
likely to be confusing to new users. It can also apply to global
variables that are never used before being passed into functions;
how the function uses them changes their type upon return.
I will see if I can't revise the wording a little bit without making it