TextWriter

From Erights

(Difference between revisions)
Jump to: navigation, search
(shorten redirect)
 
Line 1: Line 1:
-
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]].
+
A [[TextWriter]] is a sort of character output stream. It implements the cycle detection and formatting capabilities in E's primary printing mechanisms, [[Object E#toString/1|E#toString/1]] and [[Miranda __printOn/1]].
{{XXX|...}}
{{XXX|...}}

Latest revision as of 23:17, 20 April 2011

A TextWriter is a sort of character output stream. It implements the cycle detection and formatting capabilities in E's primary printing mechanisms, E#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