*** empty log message ***

This commit is contained in:
2006-09-03 15:47:11 +00:00
parent b82fbb2070
commit 3aab1e7631
7 changed files with 279 additions and 78 deletions

47
ase/test/awk/t36.awk Normal file
View File

@ -0,0 +1,47 @@
# test cases
#
# input data []
# result:
# NF=0
#
# input data [abcdefg]
# NF=2
# 0 []
# 1 [bcdefg]
#
# input data [abdefg abcdefg]
# NF=3
# 0 []
# 1 [bdefg ]
# 2 [bcdefg]
#
# input data [ abcdefg hij a a]
# NF=4
# 0 [ ]
# 1 [bcdefg hij ]
# 2 [ ]
# 3 []
#
# input data [ abcdefg hij a a ]
# NF=4
# 0 [ ]
# 1 [bcdefg hij ]
# 2 [ ]
# 3 [ ]
#
# input data [aaaaa]
# NF=6
# 0 []
# 1 []
# 2 []
# 3 []
# 4 []
# 5 []
#
BEGIN { FS="a"; }
{
print "NF=" NF;
for (i = 0; i < NF; i++) print i " [" $(i+1) "]";
}

6
ase/test/awk/t37.awk Normal file
View File

@ -0,0 +1,6 @@
BEGIN { FS=" "; }
{
print "NF=" NF;
for (i = 0; i < NF; i++) print i " [" $(i+1) "]";
}

6
ase/test/awk/t38.awk Normal file
View File

@ -0,0 +1,6 @@
BEGIN {
split ("a b c d e", x, "");
for (j in x) print j "->" x[j];
print "-------------------";
}