Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!ames!pasteur!ucbvax!decwrl!sun!pitstop!sundc!seismo!uunet!munnari!otc!metro!basser!usage!elecvax!8325499 From: 8325499@elecvax.eecs.unsw.oz (Gilbert Taylor-Wood) Newsgroups: comp.sys.mac.programmer Subject: How do you tell if a file variable is in use under MPW Pascal. Message-ID: <4100@elecvax.eecs.unsw.oz> Date: 13 Jul 88 16:37:15 GMT Organization: EE and CS, Uni of NSW, Sydney, Australia Lines: 32 Is there any way to tell if a file variable is in use ?. I need this because MPW gets upset if you try to open a file using a variable that is already in use. My current solution is to always close the file variable before opening a file. What I would like is a function to check for this. Can anyone supply the missing function "file_is_open" for me ?. program junk; var foo : text; begin ...lots of good stuff... if ( file_is_open( foo ) then close ( foo ); open ( foo, 'bar' ) ... more good stuff... end. As usual please post to me and I will sumarize the replys thanks Gilbert --- Gilbert Taylor-Wood P.O. Box 448 Kensington NSW ACSnet : 8325499@elecvax.eecs.unsw.oz AUSTRALIA 2033 Bitnet : 8325499@elecvax.eecs.unsw.oz@munnari.oz