#

Search | Home | Alpha | Brief | Topical | Hierarchical

closefrm

Tidy up after reading a MetaPost file.

Defines a ‘closefrom’ macro to complement the ‘readfrom’ primitive. It operates by repeatedly reading from a file until reaching EOF, which has the side-effect of closing the file.

The macro might be useful to avoid running out of read files when using the MetaPost graph package to process many data files that contain extra junk at the end. (In such circumstances, reading the files will stop short of the end, so leaving the file open.)

The author is Ulrik Vieth.

License: unknown Catalogued: 2006-05-09

- Visit
  - Visit a nearby CTAN:/graphics/metapost/contrib/macros/misc/closefrm.mp. If this fails, try Cambridge.
  - Visit Cambridge:/graphics/metapost/contrib/macros/misc/closefrm.mp