bug-gawk
[Top][All Lists]
Advanced

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

Re: [bug-gawk] Gawk manual: local variables are initialized to the empty


From: Aharon Robbins
Subject: Re: [bug-gawk] Gawk manual: local variables are initialized to the empty string
Date: Thu, 19 Jun 2014 20:04:09 +0300
User-agent: Heirloom mailx 12.5 6/20/10

Hi.

> 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
>
> Hi,
>
> 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 
> 9.2.1
>
> "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
too messy.

Thanks,

Arnold



reply via email to

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