Oh, between Loop and Exit, there should also be a $x=Close(1)...
_________________________
Regards, Jeroen. There are two ways to write error-free programs. Only the third one works.