LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Sun, 18 Sep 2011 12:59:24 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (29 lines)
On 18/09/2011 10:46, Will Robertson wrote:
>> I guess an
>> alternative is to set up the code such that a stream which has been
>> closed will give a suitable error message if one tries to use it.
> 
> I prefer this option; I think it's natural to want to write
> 
> \iow_new:N \g_foo_iow
> ...
> \cs_new:Nn \foo_internal_something:n
>   {
>     \iow_open:Nn \g_foo_iow {#1.output}
>     ...
>     \iow_close:N
>   }

That's easy to do, leaving only the question of what happens with

  \iow_new:N \l_my_stream
  \iow_open:N \l_my_stream { <file> }
  ...
  \iow_close:N \l_my_stream
  ..
  \iow_open:N \l_my_stream { <file> }

The easiest approach is that we just overwrite the <file>.
-- 
Joseph Wright

ATOM RSS1 RSS2