[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fwd: Retrieve and In Bug?
From: |
Gerrit Riessen |
Subject: |
Fwd: Retrieve and In Bug? |
Date: |
Wed, 21 Jul 2004 12:02:13 +0200 |
I am sorry ... i just RTFM:
"
A reference to an array element that has no recorded value yields a value of
"", the null string.
This includes elements that have not been assigned any value as well as
elements that have been
deleted (see Section 7.6 [The delete Statement], page 108). Such a reference
automatically
creates that array element, with the null string as its value. (In some cases,
this is unfortunate,
because it might waste memory inside awk.)
"
Sorry to have wasted your time!
Regards, Gerrit
> Hello,
>
> I might have found a bug in the handling values that are not
> defined in arrays.
>
> Basically what I do is attempt to retrieve a value that is not
> defined as an index in an array, i.e. value = array[index]. This causes
> if the index is not defined, i.e. (index in array) returns 0, to define
> the index, i.e. (index in array) returns 1 after calling value = array[index].
>
> I've tested this on GNU/Linux with Gawk 3.1.0 and on Win2000 with
> Gawk 3.1.3. I've also included the test program.
>
> Cheers, Gerrit
________________________________________________________________
Verschicken Sie romantische, coole und witzige Bilder per SMS!
Jetzt neu bei WEB.DE FreeMail: http://freemail.web.de/?mc=021193