I wanted to use matrixs in awk and got some problem, here is some of the script code, from the BEGIN tag:
I almost sure the problem is the form of the array index ,as in awk probably there is no matrixs.
Please help me with this.
Code:
row_char[1]="a";row_char[2]="b";row_char[3]="c";row_char[4]="d";row_char[5]="e"$
row_char[8]="h";row_char[9]="i";row_char[10]="j";row_char[11]="k";
# from the proccess passage:
sentence[varchar[11],1]=1;
diffrence=4;
i=7;
sum_index=diffrence+i;
printf("test: %d",sentence[row_char[11],1]); # it prints that like it should be test: 1
printf("test2: %d",sentence[row_char[sum_index],1]); # here it prints test2: 0 that does not right.
Please help me with this.
Comment