I am sorry to annoy you once again in three days with my questions but i beg for your understanding. Let's suppose we have an array with many different values and among them some -999 values like below: 12 I need to make a program which replaces the first (-999) value that it reads with the average of the exact before of that 14 ←------ number and the next non (-999)value that there is -999 ←---------For example this -999 should be replaced with (14+34)/2 -999 -999 -999 34 ←-----next 45 -999 10 Also we make the hypothesis that -999 cant be found on the first and the last array box... Array's dimension is not known ... I would be grateful once again if you could reply to my post Dimitris
Dimitris