aboutsummaryrefslogtreecommitdiff
path: root/src/hyper/pages/STRTBL.pht
blob: e68e21679e04987419c35b51b52951f96de4d306 (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
\begin{patch}{StringTableXmpPagePatch1}
\begin{paste}{StringTableXmpPageFull1}{StringTableXmpPageEmpty1}
\pastebutton{StringTableXmpPageFull1}{\hidepaste}
\tab{5}\spadcommand{t: StringTable(Integer) := table()\bound{t }}
\indentrel{3}\begin{verbatim}
   (1)  table()
                              Type: StringTable Integer
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StringTableXmpPageEmpty1}
\begin{paste}{StringTableXmpPageEmpty1}{StringTableXmpPagePatch1}
\pastebutton{StringTableXmpPageEmpty1}{\showpaste}
\tab{5}\spadcommand{t: StringTable(Integer) := table()\bound{t }}
\end{paste}\end{patch}

\begin{patch}{StringTableXmpPagePatch2}
\begin{paste}{StringTableXmpPageFull2}{StringTableXmpPageEmpty2}
\pastebutton{StringTableXmpPageFull2}{\hidepaste}
\tab{5}\spadcommand{for s in split("My name is Ian Watt.",char " ")
  repeat
    t.s := \#s
\free{t }\bound{h }}
\indentrel{3}\begin{verbatim}
                                             Type: Void
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StringTableXmpPageEmpty2}
\begin{paste}{StringTableXmpPageEmpty2}{StringTableXmpPagePatch2}
\pastebutton{StringTableXmpPageEmpty2}{\showpaste}
\tab{5}\spadcommand{for s in split("My name is Ian Watt.",char " ")
  repeat
    t.s := \#s
\free{t }\bound{h }}
\end{paste}\end{patch}

\begin{patch}{StringTableXmpPagePatch3}
\begin{paste}{StringTableXmpPageFull3}{StringTableXmpPageEmpty3}
\pastebutton{StringTableXmpPageFull3}{\hidepaste}
\tab{5}\spadcommand{for key in keys t repeat output [key, t.key]\free{t h }}
\indentrel{3}\begin{verbatim}
   ["Ian",3]
   ["My",2]
   ["Watt.",5]
   ["name",4]
   ["is",2]
                                             Type: Void
\end{verbatim}
\indentrel{-3}\end{paste}\end{patch}

\begin{patch}{StringTableXmpPageEmpty3}
\begin{paste}{StringTableXmpPageEmpty3}{StringTableXmpPagePatch3}
\pastebutton{StringTableXmpPageEmpty3}{\showpaste}
\tab{5}\spadcommand{for key in keys t repeat output [key, t.key]\free{t h }}
\end{paste}\end{patch}