[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Gawk 3.1.6 bug?
From: |
Nielsen, Dan (GE, Corporate) |
Subject: |
Gawk 3.1.6 bug? |
Date: |
Thu, 19 Feb 2009 15:33:48 -0500 |
I don't know if this is a bug or not. Or, if it has already been reported.
When I populate an array and test its length everything is fine.
However, if testing the length of array first then populating it I get the
message
"fatal: split: second argument is not an array"
I suspect this is because arr as in length(arr) defines arr as a string then
split("",arr) verifies that arr is indeed an array.
BTW, both these examples work as desired under awk95 and Tawk.
# array length then array load
# How to run: GAWK_3_1_6.EXE -f ZERROR9A.AWK
# error message: fatal: split: second argument is not an array
BEGIN {
if (length(arr) == 0) { print("T") } else { print("F") }
f()
}
function f() { split("1",arr) }
# array load then array length
# How to run: GAWK_3_1_6.EXE -f ZERROR9B.AWK
# error message: none
BEGIN {
f()
if (length(arr) == 0) { print("T") } else { print("F") }
}
function f() { split("1",arr) }
smime.p7s
Description: S/MIME cryptographic signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Gawk 3.1.6 bug?,
Nielsen, Dan (GE, Corporate) <=