Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!bcstec!galileo!rfh3273 From: rfh3273@galileo.rtn.ca.boeing.com (Dick Harrigill) Newsgroups: comp.lang.pascal Subject: TP6 - Standard Out got closed Message-ID: <382@galileo.rtn.ca.boeing.com> Date: 13 May 91 17:20:00 GMT Organization: be30r Lines: 27 I've just experienced a strange error with TP6. I'm using a function that I've successfully used for years to check the existance of a file: FUNCTION this_file_exists (VAR s:string) : boolean; VAR f:file; BEGIN {$I-} assign(f,s); reset(f); this_file_exists:=(IOError=0); close(f); {$I+} END; This week, for the first time, passing a bad file name to this file somehow closed standard output when the close(f) statement was run. A successive statement such as writeln('Hi') yeilds a runtime error 103 - file not open. I have gotten around the problem by placing an IF test in the function and not doing the close if the file was not properly opened. I am, however, intrigued by this phenomenon. The close(f) function should simply (with $I-) give an IOErorr, not screw other things up. Can anyone give some insight? -- Dick Harrigill, an independent voice from: Boeing Commercial Airplanes M/S 9R-49 PO BOX 3707 Renton Avionics/Flight Systems Seattle, WA 91824 Computing Support (206) 393-9539 rfh3273@galileo.rtn.ca.boeing.com