[metapost] paucity of i/o files

Hans Hagen pragma at wxs.nl
Mon Feb 28 11:28:54 CET 2005


Taco Hoekwater wrote:

> You *can* close a file, by sending a string consisting solely of
> an ascii zero to it.  The following should work. If it does not,
> it is a bug in OzTeX.

there are/were some more weird things with files, (sometimes you need to open 
them twice to it done); time for a revision

>   string s;
>   for a := 1 upto 100 :
>     s := "wr_file" & decimal(a) & ".xps";
>     write s to s;
>     write EOF to s; % that's char 0, defined in plain.mp
>   endfor;
>   end
> 
> I am not at all sure that this is documented, though. ;-)

no

Hans

-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------



More information about the metapost mailing list