From Erights

Revision as of 22:38, 14 May 2009 by Kevin Reid (Talk | contribs)
Jump to: navigation, search

A TextWriter is a sort of character output stream. It implements the cycle detection and formatting capabilities in E's primary printing mechanisms, E (object)#toString/1 and Miranda __printOn/1.

XXX ...

The TextWriter supplied to __printOn is invalid after __printOn returns.

? var stream := null
? def capturer { 
>   to __printOn(s :TextWriter) :void { 
>     s.print("<capturer>")
>     stream := s
>   }
> }
# value: <capturer>

The particular problem might change, but anything but # stdout: Oops! is okay.

? stream.print("Oops!")
# problem: <NullPointerException>

This page is a stub; it should be expanded with more information. If doing so, check the original E web site and the mailing list archives for content which could be moved into this page.
Personal tools
more tools