A small PS. Naturally, the macro > #define index(a,i,j) (*(a + i*d1 + j)) really needs extra parenthesization, like so: #define index(a,i,j) (*((a) + (i)*d1 + (j))) or, (using subscripts) like so: #define index(a,i,j) ((a)[(i)*d1 + (j)]) -- Wayne Throop at Data General, RTP, NC <the-known-world>!mcnc!rti-sel!dg_rtp!throopw