rob@xxxxxxxxx wrote:
I think his question was why not just do a if %open(myfile);
close myfile;

instead of open myfile;
myfileOpen=*on;
...
if myfileOpen;
close myfile;

You've missed an important point in David's code. He has
if not %open();

before opening the file. If I followed him correctly, the idea is that if another procedure in the module already had the file open, the file should not be closed when this procedure finishes.

To put it another way, %open() is local to the module, but the myfileOpen flag is local to the procedure.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.