Therefore, I wanted to ask here, what can I do. Below you can find the last versions of the two functions, and my bit error rate calculation function. I simply need some method to remove those static keyword and instead using something else which will do the exact same thing.

void interleaver(short *input, short *output, static short *ber_input, int N_CBPS,int N_BPSC) { int i; int t; int k; int s; short first_permutuation[N_CBPS - 1]; for (k = 0; k < N_CBPS; k++) { i = (N_CBPS/16)*(k % 16) + (k/16); first_permutuation[i] = input[k]; } s = fmax(N_BPSC/2,1); for(i = 0; i < N_CBPS;i++) { t = s*(i/s) + (i + N_CBPS - ((16*i)/N_CBPS)) % s; output[t] = first_permutuation[i]; ber_input[t] = first_permutuation[i]; } } // more functions are goes here, and they are executed void BPSKdemapping(short* input, short* output, static short* ber_output, int nbits) { int i; for(i = 0; i < nbits; i++) { if(input[i] == -1) { output[i] = 0; ber_output[i] = 0; } else { output[i] = 1; ber_output[i] = 1; } } } // then my bit error rate function comes int ber(static short* input, static short* output, int nbits) { int i, count = 0; for(i = 0; i < nbits; i++) { if(input[i] != output[i]) count++; } return count; }

This post has been edited by **erkant**: 18 May 2012 - 10:28 AM