aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/pages/TEXTFILE.pht
blob: ebf5125e3555b172b872430ab98ae71b4a57f1b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
\begin{patch}{TextFileXmpPagePatch1}
\begin{paste}{TextFileXmpPageFull1}{TextFileXmpPageEmpty1}
\pastebutton{TextFileXmpPageFull1}{\hidepaste}
\tab{5}\spadcommand{f1: TextFile := open("/etc/group", "input")\bound{f1 }}
\indentrel{3}\begin{verbatim}
   (1)  "/etc/group"
                                         Type: TextFile
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty1}
\begin{paste}{TextFileXmpPageEmpty1}{TextFileXmpPagePatch1}
\pastebutton{TextFileXmpPageEmpty1}{\showpaste}
\tab{5}\spadcommand{f1: TextFile := open("/etc/group", "input")\bound{f1 }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch2}
\begin{paste}{TextFileXmpPageFull2}{TextFileXmpPageEmpty2}
\pastebutton{TextFileXmpPageFull2}{\hidepaste}
\tab{5}\spadcommand{f2: TextFile := open("/tmp/MOTD", "output")\bound{f2 }}
\indentrel{3}\begin{verbatim}
   (2)  "/tmp/MOTD"
                                         Type: TextFile
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty2}
\begin{paste}{TextFileXmpPageEmpty2}{TextFileXmpPagePatch2}
\pastebutton{TextFileXmpPageEmpty2}{\showpaste}
\tab{5}\spadcommand{f2: TextFile := open("/tmp/MOTD", "output")\bound{f2 }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch3}
\begin{paste}{TextFileXmpPageFull3}{TextFileXmpPageEmpty3}
\pastebutton{TextFileXmpPageFull3}{\hidepaste}
\tab{5}\spadcommand{l := readLine! f1\free{f1 }\bound{l }}
\indentrel{3}\begin{verbatim}
   (3)  "system:*:0:root"
                                           Type: String
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty3}
\begin{paste}{TextFileXmpPageEmpty3}{TextFileXmpPagePatch3}
\pastebutton{TextFileXmpPageEmpty3}{\showpaste}
\tab{5}\spadcommand{l := readLine! f1\free{f1 }\bound{l }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch4}
\begin{paste}{TextFileXmpPageFull4}{TextFileXmpPageEmpty4}
\pastebutton{TextFileXmpPageFull4}{\hidepaste}
\tab{5}\spadcommand{writeLine!(f2, upperCase l)\free{f2 l }}
\indentrel{3}\begin{verbatim}
   (4)  "SYSTEM:*:0:ROOT"
                                           Type: String
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty4}
\begin{paste}{TextFileXmpPageEmpty4}{TextFileXmpPagePatch4}
\pastebutton{TextFileXmpPageEmpty4}{\showpaste}
\tab{5}\spadcommand{writeLine!(f2, upperCase l)\free{f2 l }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch5}
\begin{paste}{TextFileXmpPageFull5}{TextFileXmpPageEmpty5}
\pastebutton{TextFileXmpPageFull5}{\hidepaste}
\tab{5}\spadcommand{while not endOfFile? f1 repeat
    s := readLine! f1
    writeLine!(f2, upperCase s)
\free{f1 f2 }\bound{Copied }}
\indentrel{3}\begin{verbatim}
                                             Type: Void
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty5}
\begin{paste}{TextFileXmpPageEmpty5}{TextFileXmpPagePatch5}
\pastebutton{TextFileXmpPageEmpty5}{\showpaste}
\tab{5}\spadcommand{while not endOfFile? f1 repeat
    s := readLine! f1
    writeLine!(f2, upperCase s)
\free{f1 f2 }\bound{Copied }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch6}
\begin{paste}{TextFileXmpPageFull6}{TextFileXmpPageEmpty6}
\pastebutton{TextFileXmpPageFull6}{\hidepaste}
\tab{5}\spadcommand{close! f1\free{Copied }\bound{closed1 }}
\indentrel{3}\begin{verbatim}
   (6)  "/etc/group"
                                         Type: TextFile
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty6}
\begin{paste}{TextFileXmpPageEmpty6}{TextFileXmpPagePatch6}
\pastebutton{TextFileXmpPageEmpty6}{\showpaste}
\tab{5}\spadcommand{close! f1\free{Copied }\bound{closed1 }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch7}
\begin{paste}{TextFileXmpPageFull7}{TextFileXmpPageEmpty7}
\pastebutton{TextFileXmpPageFull7}{\hidepaste}
\tab{5}\spadcommand{write!(f2, "-The-")\free{Copied }\bound{tthhee }}
\indentrel{3}\begin{verbatim}
   (7)  "-The-"
                                           Type: String
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty7}
\begin{paste}{TextFileXmpPageEmpty7}{TextFileXmpPagePatch7}
\pastebutton{TextFileXmpPageEmpty7}{\showpaste}
\tab{5}\spadcommand{write!(f2, "-The-")\free{Copied }\bound{tthhee }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch8}
\begin{paste}{TextFileXmpPageFull8}{TextFileXmpPageEmpty8}
\pastebutton{TextFileXmpPageFull8}{\hidepaste}
\tab{5}\spadcommand{write!(f2, "-End-")\free{tthhee }\bound{eenndd }}
\indentrel{3}\begin{verbatim}
   (8)  "-End-"
                                           Type: String
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty8}
\begin{paste}{TextFileXmpPageEmpty8}{TextFileXmpPagePatch8}
\pastebutton{TextFileXmpPageEmpty8}{\showpaste}
\tab{5}\spadcommand{write!(f2, "-End-")\free{tthhee }\bound{eenndd }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch9}
\begin{paste}{TextFileXmpPageFull9}{TextFileXmpPageEmpty9}
\pastebutton{TextFileXmpPageFull9}{\hidepaste}
\tab{5}\spadcommand{writeLine! f2\free{eenndd }\bound{LastLine }}
\indentrel{3}\begin{verbatim}
   (9)  ""
                                           Type: String
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty9}
\begin{paste}{TextFileXmpPageEmpty9}{TextFileXmpPagePatch9}
\pastebutton{TextFileXmpPageEmpty9}{\showpaste}
\tab{5}\spadcommand{writeLine! f2\free{eenndd }\bound{LastLine }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch10}
\begin{paste}{TextFileXmpPageFull10}{TextFileXmpPageEmpty10}
\pastebutton{TextFileXmpPageFull10}{\hidepaste}
\tab{5}\spadcommand{close! f2\free{LastLine }\bound{closed2 }}
\indentrel{3}\begin{verbatim}
   (10)  "/tmp/MOTD"
                                         Type: TextFile
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty10}
\begin{paste}{TextFileXmpPageEmpty10}{TextFileXmpPagePatch10}
\pastebutton{TextFileXmpPageEmpty10}{\showpaste}
\tab{5}\spadcommand{close! f2\free{LastLine }\bound{closed2 }}
\end{paste}\end{patch}

\begin{patch}{TextFileXmpPagePatch11}
\begin{paste}{TextFileXmpPageFull11}{TextFileXmpPageEmpty11}
\pastebutton{TextFileXmpPageFull11}{\hidepaste}
\tab{5}\spadcommand{)system rm /tmp/MOTD\free{closed2 }}
\indentrel{3}\begin{verbatim}
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{TextFileXmpPageEmpty11}
\begin{paste}{TextFileXmpPageEmpty11}{TextFileXmpPagePatch11}
\pastebutton{TextFileXmpPageEmpty11}{\showpaste}
\tab{5}\spadcommand{)system rm /tmp/MOTD\free{closed2 }}
\end{paste}\end{patch}