CTAN Comprehensive TeX Archive Network

closefrm – Tidy up after reading a file

De­fines a ‘close­from’ macro to com­ple­ment the ‘read­from’ prim­i­tive. It op­er­ates by re­peat­edly read­ing from a file un­til reach­ing EOF, which has the side-ef­fect of clos­ing the file.

The macro might be use­ful to avoid run­ning out of read files when us­ing the graph pack­age to pro­cess many data files that con­tain ex­tra junk at the end. (In such cir­cum­stances, read­ing the files will stop short of the end, so leav­ing the file open.)

Main­tainerUl­rik Vi­eth
TopicsI/O man­age­ment

Com­mu­nity Com­ments

Guest Book Sitemap Contact Contact Author