[texhax] \write17?
Karl Berry
karl at freefriends.org
Sun Oct 21 00:05:41 CEST 2018
jh> \write16 was adopted early on as a convention to write to both.
I see it in the TeXbook. Is that understanding right?
Any positive closed stream will do, afaik. I have not see many
references to \write16 outside of the TeXbook. But yes, I guess so.
But \write17? Google gives me a references to it, but what is it for?
How is it different than \write16? If it is no different then why was it
skipped over in getting to \write18?
There is code in tex.web that refers to streams 16 and 17. Search for
write_stream. In essence, 16 = "out of bounds but positive", and 17 =
"out of bounds but negative". These are implementation magic numbers not
visible to the user, but it does sort of explain why 17 would be avoided
when choosing a new number.
(It was too long ago, but I think it was Tom Rokicki who who originally
implemented \write18 for his NeXT? Amiga? something distribution. Not sure.
web2c/ChangeLog says it was me, but I'm pretty sure I didn't write it
from scratch.)
dc> For example latex (for no good reason that I can see) uses an)
allocated but unused stream \@unused (which is 0))
for \typeout.
Doesn't that waste one of the 16 precious usable streams? --thanks, karl.
More information about the texhax
mailing list