Arc Cross Reference

w/outstring

[macro] w/infile var name body ...

[macro] w/outfile var name body ...

[macro] w/appendfile var name body ...

[macro] w/instring var string body ...

[macro] w/outstring var body ...

Convenience macros. Open a file port from the named file (w/infile, w/outfile or w/appendfile) or a string port w/instring or w/outstring), binds var to it, then executes body.

The port is closed automatically, even an exception is thrown in body ....

See also: infile, outfile, instring, outstring, scheme:call-with-input-file, scheme:call-with-output-file, scheme:call-with-input-string, scheme:call-with-output-string