How about: while ((rtns = fread(buf,5,10,ioptr)) == 10) (i.e. fread, store return value in rtns, then compare it to 10) Your version compares the result of the fread to 10 and stores the result in rtns (either 1 or 0). (I think.) Dave Kumpf hplabs!hp-lsd!davek