1 <!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=UTF-8">
5 <meta http-equiv=
"Content-Style-Type" content=
"text/css">
7 <meta name=
"Generator" content=
"Cocoa HTML Writer">
8 <meta name=
"CocoaVersion" content=
"949.43">
9 <style type=
"text/css">
10 p
.p1
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
}
11 p
.p2
{margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica
; min-height: 14.0px}
12 p
.p3
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; min-height: 12.0px}
13 p
.p4
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #606060}
14 p
.p5
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #406c1b}
15 p
.p6
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
}
16 p
.p7
{margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco
; color: #992714}
17 p
.p8
{margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica
}
18 p
.p9
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco
; min-height: 12.0px}
19 p
.p10
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica
}
20 p
.p11
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica
; min-height: 14.0px}
21 p
.p12
{margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco
}
22 span
.s1
{font: 18.0px Helvetica
}
23 span
.s2
{color: #000000}
24 span
.s3
{color: #0021b6}
25 span
.s4
{color: #606060}
26 span
.s5
{color: #0027b6}
27 span
.s6
{font: 9.0px Monaco
}
28 span
.Apple-tab-span
{white-space:pre
}
32 <p class=
"p1"><span class=
"s1"><b>Post
<span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b></span><b>posts text to the post window
</b></p>
33 <p class=
"p2"><br></p>
34 <p class=
"p1"><b>Inherits from: Object
</b></p>
35 <p class=
"p3"><br></p>
36 <p class=
"p1">The class Post is a stream destination.
</p>
37 <p class=
"p2"><br></p>
38 <p class=
"p4"><span class=
"s2">a =
</span>"a string"<span class=
"s2">;
</span></p>
39 <p class=
"p5"><span class=
"s2">b =
</span>'a symbol'
<span class=
"s2">;
</span></p>
40 <p class=
"p6">c =
4;
</p>
41 <p class=
"p6">d = [
1,
2,
3,
4,a,b];
</p>
42 <p class=
"p3"><br></p>
43 <p class=
"p7">// post as string
</p>
44 <p class=
"p6"><span class=
"s3">Post
</span> << a
<< <span class=
"s3">Char
</span>.nl;
</p>
45 <p class=
"p7">// post as compile string
</p>
46 <p class=
"p6"><span class=
"s3">Post
</span> <<< a
<< <span class=
"s3">Char
</span>.nl;
</p>
47 <p class=
"p3"><br></p>
48 <p class=
"p7">// post as string
</p>
49 <p class=
"p6"><span class=
"s3">Post
</span> << d
<< <span class=
"s3">Char
</span>.nl;
</p>
50 <p class=
"p7">// post as compile string
</p>
51 <p class=
"p6"><span class=
"s3">Post
</span> <<< d
<< <span class=
"s3">Char
</span>.nl;
</p>
52 <p class=
"p3"><br></p>
53 <p class=
"p1">This is the equivalent of :
</p>
54 <p class=
"p6">d.postln;
</p>
56 <p class=
"p6">d.asCompileString.postln;
</p>
57 <p class=
"p3"><br></p>
58 <p class=
"p3"><br></p>
59 <p class=
"p3"><br></p>
60 <p class=
"p1">Its main use is that it can sometimes make code more readable and execution slightly more efficient.
</p>
61 <p class=
"p3"><br></p>
62 <p class=
"p6"><span class=
"s3">Post
</span> <<< a
<< <span class=
"s4">" "</span> <<< b
<< <span class=
"s4">" "</span> <<< c
<< <span class=
"s4">" "</span> <<< d
<< <span class=
"s3">Char
</span>.nl;
</p>
64 <p class=
"p6">(a.asCompileString + b.asCompileString + c.asCompileString + d.asCompileString).postln;
</p>
65 <p class=
"p3"><br></p>
66 <p class=
"p1">Warning:
</p>
67 <p class=
"p1"><span class=
"Apple-tab-span"> </span><< also means object left shift
</p>
68 <p class=
"p2"><span class=
"Apple-tab-span"> </span></p>
69 <p class=
"p8"><b>Class Methods
</b></p>
70 <p class=
"p9"><br></p>
71 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span>Post
<< item
</b></p>
72 <p class=
"p11"><b><span class=
"Apple-tab-span"> </span></b></p>
73 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Post as string
</p>
74 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
75 <p class=
"p12"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">Post
</span> << "string";
</p>
76 <p class=
"p9"><br></p>
77 <p class=
"p9"><br></p>
78 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span>Post
<<< item
</b></p>
79 <p class=
"p11"><b><span class=
"Apple-tab-span"> </span></b></p>
80 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Post as compile string
</p>
81 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
82 <p class=
"p12"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">Post
</span> <<< "string";
</p>
83 <p class=
"p9"><br></p>
84 <p class=
"p9"><br></p>
85 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span>*comma
</b></p>
86 <p class=
"p11"><b><span class=
"Apple-tab-span"> </span></b></p>
87 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Prints a comma
</p>
88 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
89 <p class=
"p12"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">Post
</span>.comma;
</p>
90 <p class=
"p9"><br></p>
91 <p class=
"p9"><br></p>
92 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span>*space
</b></p>
93 <p class=
"p11"><b><span class=
"Apple-tab-span"> </span></b></p>
94 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Prints a space
</p>
95 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
96 <p class=
"p12"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">Post
</span>.space;
</p>
97 <p class=
"p9"><br></p>
98 <p class=
"p9"><br></p>
99 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span>*nl
</b></p>
100 <p class=
"p11"><b><span class=
"Apple-tab-span"> </span></b></p>
101 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Prints a newline
</p>
102 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
103 <p class=
"p12"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">Post
</span>.nl;
</p>
104 <p class=
"p9"><br></p>
105 <p class=
"p9"><br></p>
106 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span>*ff
</b></p>
107 <p class=
"p11"><b><span class=
"Apple-tab-span"> </span></b></p>
108 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Prints the char
<span class=
"s6">$\f
</span></p>
109 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
110 <p class=
"p12"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">Post
</span>.ff;
</p>
111 <p class=
"p9"><br></p>
112 <p class=
"p9"><br></p>
113 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span>*tab
</b></p>
114 <p class=
"p11"><b><span class=
"Apple-tab-span"> </span></b></p>
115 <p class=
"p10"><b><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></b>Prints a tab
</p>
116 <p class=
"p11"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span></p>
117 <p class=
"p12"><span class=
"Apple-tab-span"> </span><span class=
"Apple-tab-span"> </span><span class=
"s5">Post
</span>.tab;
</p>
118 <p class=
"p9"><br></p>
119 <p class=
"p9"><br></p>
120 <p class=
"p9"><br></p>
121 <p class=
"p9"><br></p>