Hello, everybody.
Does anybody use awk95 by Brian W. Kernighan? I think, I found a bug in realization of function split(), but I am not sure.
Here is a sample code where you can see it:
BEGIN {
time = "10:30:00,000"
split( time, a, ":" )
print a[3] # prints 00,000 - it's OK
i = split ( a[3], a, "," ) # I want to split "00,000" by ","
print i # prints 2 - it's OK
print "a[1] = " a[1] # prints garbage, must be 00
print "a[2] = " a[2] # prints garbage, must be 000
}
Regards,
Vitaliy.
Does anybody use awk95 by Brian W. Kernighan? I think, I found a bug in realization of function split(), but I am not sure.
Here is a sample code where you can see it:
BEGIN {
time = "10:30:00,000"
split( time, a, ":" )
print a[3] # prints 00,000 - it's OK
i = split ( a[3], a, "," ) # I want to split "00,000" by ","
print i # prints 2 - it's OK
print "a[1] = " a[1] # prints garbage, must be 00
print "a[2] = " a[2] # prints garbage, must be 000
}
Regards,
Vitaliy.