-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsearch.tex
566 lines (426 loc) · 18.6 KB
/
search.tex
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
% !TeX root = forth.tex
% !TeX spellcheck = en_US
% !TeX program = pdflatex
\chapter{The optional Search-Order word set} % 16
\wordlist{search}
\section{Introduction} % 16.1
\section{Additional terms and notation} % 16.2
\label{search:terms}
\begin{description}
\item[compilation word list:]
The word list into which new definition names are placed.
\item[search order:]
A list of word lists specifying the order in which the
dictionary will be searched.
\item[\uline{find:}]
\place{x:defined-find}{Update \xref{notation:terms} definition of
find to search the search order or a specified wordlist fora definition
name matching a given string.}
\end{description}
\section{Additional usage requirements} % 16.3
\subsection{Data types} % 16.3.1
Word list identifiers are implementation-dependent single-cell
values that identify word lists.
Append table \ref{search:types} to table \ref{table:datatypes}.
\begin{table}[h]
\begin{center}
\caption{Data types}
\label{search:types}
\begin{tabular}{llr}
\hline\hline
\emph{Symbol} & \emph{Data type} & \emph{Size on stack} \\
\hline
\emph{wid} & word list identifiers & 1 cell \\
\hline\hline
\end{tabular}
\end{center}
\end{table}
See: \xref[3.1 Data types]{usage:data},
\xref[3.4.2 Finding definition names]{usage:find},
\xref[3.4 The Forth text interpreter]{usage:command}.
\subsection{Environmental queries} % 16.3.2
Append table \ref{search:env} to table \ref{table:env}.
See: \xref[3.2.6 Environmental queries]{usage:env}.
\begin{table}[ht]
\begin{center}
\caption{Environmental Query Strings}
\label{search:env}
\begin{tabular}{p{10em}rcp{0.42\textwidth}}
\hline\hline
\multicolumn{2}{l}{String \hfill Value data type} & Constant? & Meaning \\
\hline
\texttt{WORDLISTS} & \emph{n} & yes &
maximum number of word lists usable in the search order\\
\hline\hline
\end{tabular}
\end{center}
\end{table}
\subsection{Finding definition names} % 16.3.3
\label{search:find}
When searching a word list for a definition name, the system shall
search each word list from its last definition to its first. The
search may encompass only a single word list, as with
\word{SEARCH-WORDLIST}, or all the word lists in the search order,
as with the text interpreter and \word{FIND}.
Changing the search order shall only affect the subsequent finding
of definition names in the dictionary. A system with the Search-Order
word set shall allow at least eight word lists in the search order.
An ambiguous condition exists if a program changes the compilation
word list during the compilation of a definition or before
modification of the behavior of the most recently compiled definition
with \word[tools]{;CODE}, \word[core]{DOES}, or
\word[core]{IMMEDIATE}.
A program that requires more than eight word lists in the search
order has an environmental dependency.
See: \xref[3.4.2 Finding definition names]{usage:find}.
\subsection{Contiguous regions} % 16.3.4
The regions of data space produced by the operations described in
\xref[3.3.3.2 Contiguous regions]{usage:contiguous} may be
non-contiguous if \word{WORDLIST} is executed between allocations.
\section{Additional documentation requirements} % 16.4
\subsection{System documentation} % 16.4.1
\subsubsection{Implementation-defined options} % 16.4.1.1
\begin{itemize}
\item maximum number of word lists in the search order
(\xref[16.3.3 Finding definition names]{search:find},
\wref{search:SET-ORDER}{SET-ORDER});
\item minimum search order
(\wref{search:SET-ORDER}{SET-ORDER},
\wref{search:ONLY}{ONLY}).
\end{itemize}
\subsubsection{Ambiguous conditions} % 16.4.1.2
\begin{itemize}
\item changing the compilation word list
(\xref[16.3.3 Finding definition names]{search:find});
\item search order empty
(\wref{search:PREVIOUS}{PREVIOUS});
\item too many word lists in search order
(\wref{search:ALSO}{ALSO}).
\end{itemize}
\subsubsection{Other system documentation} % 16.4.1.3
\begin{itemize}
\item no additional requirements.
\end{itemize}
\subsection{Program documentation} % 16.4.2
\subsubsection{Environmental dependencies} % 16.4.2.1
\begin{itemize}
\item requiring more than eight word-lists in the search order
(\xref[16.3.3 Finding definition names]{search:find}).
\end{itemize}
\subsubsection{Other program documentation} % 16.4.2.2
\begin{itemize}
\item no additional requirements.
\end{itemize}
\section{Compliance and labeling} % 16.5
\subsection{Forth-\snapshot{} systems} % 16.5.1
The phrase ``Providing the Search-Order word set'' shall be
appended to the label of any Standard System that provides all of
the Search-Order word set.
The phrase ``Providing \emph{name(s)} from the Search-Order
Extensions word set'' shall be appended to the label of any
Standard System that provides portions of the Search-Order
Extensions word set.
The phrase ``Providing the Search-Order Extensions word set'' shall
be appended to the label of any Standard System that provides all of
the Search-Order and Search-Order Extensions word sets.
\subsection{Forth-\snapshot{} programs} % 16.5.2
The phrase ``Requiring the Search-Order word set'' shall be appended
to the label of Standard Programs that require the system to provide
the Search-Order word set.
The phrase ``Requiring \emph{name(s)} from the Search-Order
Extensions word set'' shall be appended to the label of Standard
Programs that require the system to provide portions of the
Search-Order Extensions word set.
The phrase ``Requiring the Search-Order Extensions word set'' shall
be appended to the label of Standard Programs that require the system
to provide all of the Search-Order and Search-Order Extensions word
sets.
\section{Glossary} % 16.6
\subsection{Search-Order words} % 16.6.1
\begin{worddef}{1180}{DEFINITIONS}
\item \stack{}{}
Make the compilation word list the same as the first word list
in the search order. Specifies that the names of subsequent
definitions will be placed in the compilation word list.
Subsequent changes in the search order will not affect the
compilation word list.
\see \xref[16.3.3 Finding Definition Names]{search:find}.
\begin{implement} % I.16.6.1.1180 DEFINITIONS
\word{:} discard \word{p} x1 {\ldots} xn u -{}- ) \bs{} \textdf{Drop u+1 stack items} \\
\tab 0 \word{qDO} \word{DROP} \word{LOOP} \\
\word{;}
\word{:} \word{DEFINITIONS} \word{p} -{}- ) \\
\tab \word{GET-ORDER} \word{SWAP} \word{SET-CURRENT} discard \\
\word{;}
\end{implement}
\begin{testing} % T.16.6.1.1180 DEFINITIONS
\ttfamily
\test{\word{ONLY} \word{FORTH} \word{DEFINITIONS}}{} \\
\test{\word{GET-CURRENT}}{FORTH-WORDLIST}
\test{\word{GET-ORDER} wid2 \word{@} \word{SWAP} \word{1+} \word{SET-ORDER} \word{DEFINITIONS} \word{GET-CURRENT}\\}{wid2 \word{@}} \\
\test{\word{GET-ORDER}}{get-orderlist wid2 \word{@} \word{SWAP} \word{1+}} \\
\test{\word{PREVIOUS} \word{GET-ORDER}}{get-orderlist} \\
\test{\word{DEFINITIONS} \word{GET-CURRENT}}{FORTH-WORDLIST}
\word{:} alsowid2 \word{ALSO} \word{GET-ORDER} wid2 \word{@} \word{ROT} \word{DROP} \word{SWAP} \word{SET-ORDER} \word{;} \\
alsowid2 \\
\word{:} w1 1234 \word{;} \\
\word{DEFINITIONS}
\word{:} w1 -9876 \word{;} \word{IMMEDIATE}
\word{ONLY} \word{FORTH} \\
\test{w1}{1234} \\
\word{DEFINITIONS} \\
\test{w1}{1234} \\
alsowid2 \\
\test{w1}{-9876} \\
\word{DEFINITIONS}
\test{w1}{-9876}
\word{ONLY} \word{FORTH} \word{DEFINITIONS} \\
\word{:} so5 \word{DUP} \word{IF} \word{SWAP} \word{EXECUTE} \word{THEN} \word{;}
\test{\word{Sq} w1" wid1 \word{@} \word{SEARCH-WORDLIST} so5}{-1 1234} \\
\test{\word{Sq} w1" wid2 \word{@} \word{SEARCH-WORDLIST} so5}{ 1 -9876}
\word{:} c"w1" \word{Cq} w1" \word{;} \\
\test{alsowid2 c"w1" \word{FIND} so5}{ 1 -9876} \\
\test{\word{PREVIOUS} c"w1" \word{FIND} so5}{-1 1234}
\end{testing}
\end{worddef}
\begin{worddef}{1550}{FIND}
\item Extend the semantics of \wref{core:FIND}{FIND} to be:
\stack{c-addr}{c-addr 0 | xt 1 | xt -1}
Find the definition named in the counted string at \param{c-addr}.
If the definition is not found after searching all the word lists
in the search order, return \param{c-addr} and zero. If
the definition is found, return \param{xt}. If the definition is
immediate, also return one (\param{1}); otherwise also return
minus-one (\param{-1}). For a given string, the values returned
by \word{FIND} while compiling may differ from those returned
while not compiling.
\see \xref[3.4.2 Finding definition names]{usage:find},
\wref{core:'}{'},
\wref{core:FIND}{FIND},
\wref{core:POSTPONE}{POSTPONE},
\wref{core:[']}{[']}.
\begin{implement} % I.16.6.1.1550 FIND
\textdf{Assuming \texttt{\#order} and \texttt{context} are defined as per \iref{search:GET-ORDER}{}.}
\begin{tabbing}
\tab \= \tab \= \tab \= \tab \= 2swap 2drop leave \tab \= \kill
\word{:} \word{FIND} \word{p} c-addr -{}- c-addr 0 | xt 1 | xt -1 ) \+ \\
0 \>\>\>\> \word{p} c-addr 0 ) \\
\#order \word{@} 0 \word{qDO} \+ \\
\word{OVER} \word{COUNT} \>\>\> \word{p} c-addr 0 c-addr' u ) \\
\word{I} \word{CELLS} context \word{+} \word{@} \>\>\> \word{p} c-addr 0 c-addr' u wid ) \\
\word{SEARCH-WORDLIST} \>\>\> \word{p} c-addr 0; 0 | w 1 | q -1 ) \\
\word{qDUP} \word{IF} \>\>\> \word{p} c-addr 0; w 1 | w -1 ) \+ \\
\> \word{2SWAP} \word{2DROP} \word{LEAVE} \> \word{p} w 1 | w -1 ) \\
\word{THEN} \>\> \word{p} c-addr 0 ) \- \\
\word{LOOP} \>\>\> \word{p} c-addr 0 | w 1 | w -1 ) \- \\
\word{;}
\end{tabbing}
\end{implement}
\begin{testing} % T.16.6.1.1550 FIND
\ttfamily
\word{:} c"dup" \word{Cq} DUP" \word{;} \\
\word{:} c".("~ \word{Cq} .("~ \word{;} \\
\word{:} c"x"~~ \word{Cq} unknown word" \word{;}
\test{c"dup" \word{FIND}}{xt \word{@} -1} \\
\test{c".(" \word{FIND}}{xti \word{@} 1} \\
\test{c"x" \word{FIND}}{c"x" 0}
\end{testing}
\end{worddef}
\begin{worddef}{1595}{FORTH-WORDLIST}
\item \stack{}{wid}
Return \param{wid}, the identifier of the word list that includes
all standard words provided by the implementation. This word list
is initially the compilation word list and is part of the initial
search order.
\begin{testing} % T.16.6.2.1595 FORTH-WORDLIST
\test{\word{FORTH-WORDLIST} wid1 \word{!}}{}
\end{testing}
\end{worddef}
\begin{worddef}{1643}{GET-CURRENT}
\item \stack{}{wid}
Return \param{wid}, the identifier of the compilation word list.
\end{worddef}
\begin{worddef}{1647}{GET-ORDER}
\item \stack{}{wid_n {\ldots} wid_1 n}
Returns the number of word lists \param{n} in the search order
and the word list identifiers \param{wid_n} {\ldots} \param{wid_1}
identifying these word lists. \param{wid_1} identifies the word
list that is searched first, and \param{wid_n} the word list that
is searched last. The search order is unaffected.
\begin{implement} % I.16.6.1.1647 GET-ORDER
\textdf{Here is a very simple search order implementation:}
\word{VARIABLE} \#order
\word{CREATE} context ~ 16 \word{p} wordlists ) \word{CELLS} \word{ALLOT}
\word{:} \word{GET-ORDER} \word{p} -{}- wid1 {\ldots} widn n ) \\
\tab \#order \word{@} 0 \word{qDO} \\
\tab[2] \#order \word{@} \word{I} \word{-} \word{1-} \word{CELLS} context \word{+} \word{@} \\
\tab \word{LOOP} \\
\tab \#order \word{@} \\
\word{;}
\end{implement}
\end{worddef}
\begin{worddef}{2192}{SEARCH-WORDLIST}
\item \stack{c-addr u wid}{0 | xt 1 | xt -1}
Find the definition identified by the string \param{c-addr u} in
the word list identified by \param{wid}. If the definition is not
found, return zero. If the definition is found, return its
execution token \param{xt} and one (\param{1}) if the definition is
immediate, minus-one (\param{-1}) otherwise.
\see \rref{search:SEARCH-WORDLIST}{}.
\begin{rationale} % A.16.6.1.2192 SEARCH-WORDLIST
When \word{SEARCH-WORDLIST} fails to find the word, it does
not return the string, unlike \word{FIND}. This is in
accordance with the general principle that Forth words consume
their arguments.
\end{rationale}
\begin{testing} % T.16.6.1.2192 SEARCH-WORDLIST
\ttfamily
\word{ONLY} \word{FORTH} \word{DEFINITIONS} \\
\word{VARIABLE} xt~ \word{'} \word{DUP} xt~ \word{!} \\
\word{VARIABLE} xti \word{'} \word{.p}~ xti \word{!} \word{bs} \textdf{Immediate word}
\test{\word{Sq} DUP" wid1 \word{@} \word{SEARCH-WORDLIST}}{xt \word{@} -1} \\
\test{\word{Sq} .(" wid1 \word{@} \word{SEARCH-WORDLIST}}{xti \word{@} 1} \\
\test{\word{Sq} DUP" wid2 \word{@} \word{SEARCH-WORDLIST}}{ 0}
\end{testing}
\end{worddef}
\begin{worddef}{2195}{SET-CURRENT}
\item \stack{wid}{}
Set the compilation word list to the word list identified by
\param{wid}.
\begin{testing} % T.16.6.1.2195 SET-CURRENT
\test{\word{GET-CURRENT}}{wid1 \word{@}}
\test{\word{WORDLIST} wid2 \word{!}}{} \\
\test{wid2 \word{@} \word{SET-CURRENT}}{} \\
\test{\word{GET-CURRENT}}{wid2 \word{@}}
\test{wid1 \word{@} \word{SET-CURRENT}}{}
\end{testing}
\end{worddef}
\begin{worddef}{2197}{SET-ORDER}
\item \stack{wid_n {\ldots} wid_1 n}{}
Set the search order to the word lists identified by
\param{wid_n} {\ldots} \param{wid_1}. Subsequently, word list
\param{wid_1} will be searched first, and word list \param{wid_n}
searched last. If \param{n} is zero, empty the search order. If
\param{n} is minus one, set the search order to the
implementation-defined minimum search order. The minimum search
order shall include the words \word{FORTH-WORDLIST} and
\word{SET-ORDER}. A system shall allow \param{n} to be at least
eight.
\begin{implement} % I.16.6.1.2197 SET-ORDER
\textdf{This is the complement of \iref{search:GET-ORDER}{}.}
\word{:} \word{SET-ORDER} \word{p} wid1 {\ldots} widn n -{}0 ) \\
\tab \word{DUP} -1 \word{=} \word{IF} \\
\tab[2] \word{DROP} \arg{\textdf{push system default word lists and n}} \\
\tab \word{THEN} \\
\tab \word{DUP} \#order \word{!} \\
\tab 0 \word{qDO} ~ \word{I} \word{CELLS} context \word{+} \word{!} ~ \word{LOOP} \\
\word{;}
\end{implement}
\begin{testing} % T.16.6.1.2197 SET-ORDER
\ttfamily
\test{\word{GET-ORDER} \word{OVER} }{\word{GET-ORDER} wid1 \word{@}} \\% \word{bs} \textdf{Forth wordlist at top} \\
\test{\word{GET-ORDER} \word{SET-ORDER}}{} \\% \tab \word{bs} \textdf{Effectively noop} \\
\test{\word{GET-ORDER} }{get-orderlist} % \tab \word{bs} \textdf{Check nothing changed} \\
\test{get-orderlist \word{DROP} get-orderList \word{2*} \word{SET-ORDER}}{} \\
\test{\word{GET-ORDER}}{get-orderlist \word{DROP} get-orderList \word{2*}} \\
\test{get-orderlist \word{SET-ORDER} \word{GET-ORDER}}{get-orderlist}
\word{:} so2a \word{GET-ORDER} get-orderlist \word{SET-ORDER} \word{;} \\
\word{:} so2 0 \word{SET-ORDER} so2a \word{;}
\test{so2}{0} \tab[1.5] \word{bs} \textdf{0 SET-ORDER leaves an empty search order}
\word{:} so3 -1 \word{SET-ORDER} so2a \word{;} \\
\word{:} so4 \word{ONLY} so2a \word{;}
\test{so3}{so4} \tab \word{bs} \textdf{-1 SET-ORDER is the same as ONLY}
\end{testing}
\end{worddef}
\enlargethispage{2ex}
\begin{worddef}{2460}{WORDLIST}
\item \stack{}{wid}
Create a new empty word list, returning its word list identifier
\param{wid}. The new word list may be returned from a pool of
preallocated word lists or may be dynamically allocated in data
space. A system shall allow the creation of at least 8 new word
lists in addition to any provided as part of the system.
\end{worddef}
\subsection{Search-Order extension words} % 16.6.2
\extended
\begin{worddef}{0715}{ALSO}
\item \stack{}{}
Transform the search order consisting of \param{wid_n}, {\ldots}
\param{wid_2}, \param{wid_1} (where \param{wid_1} is searched
first) into \param{wid_n}, {\ldots} \param{wid_2}, \param{wid_1},
\param{wid_1}. An ambiguous condition exists if there are too
many word lists in the search order.
\begin{implement} % I.16.6.2.0715 ALSO
\word{:} \word{ALSO} \word{p} -{}- ) \\
\tab \word{GET-ORDER} \word{OVER} \word{SWAP} \word{1+} \word{SET-ORDER} \\
\word{;}
\end{implement}
\begin{testing} % T.16.6.2.0715 ALSO
\test{\word{ALSO} \word{GET-ORDER} \word{ONLY}}{get-orderlist \word{OVER} \word{SWAP} \word{1+}}
\end{testing}
\end{worddef}
\pagebreak
\begin{worddef}{1590}{FORTH}
\item \stack{}{}
Transform the search order consisting of \param{wid_n}, {\ldots}
\param{wid_2}, \param{wid_1} (where \param{wid_1} is searched
first) into \param{wid_n}, {\ldots} \param{wid_2},
\param{wid_{\word{FORTH-WORDLIST}}}.
\begin{implement} % I.16.6.2.1590 FORTH
\word{:} (wordlist) \word{p} wid "<name>" -{}- ; ) \\
\tab \word{CREATE} \word{,} \\
\tab \word{DOES} \\
\tab[2] \word{@} \word{toR} \\
\tab[2] \word{GET-ORDER} \word{NIP} \\
\tab[2] \word{Rfrom} \word{SWAP} \word{SET-ORDER} \\
\word{;}
\word{FORTH-WORDLIST} (wordlist) \word{FORTH}
\end{implement}
\end{worddef}
\begin{worddef}{1965}{ONLY}
\item \stack{}{}
Set the search order to the implementation-defined minimum search
order. The minimum search order shall include the words
\word{FORTH-WORDLIST} and \word{SET-ORDER}.
\begin{implement} % A.16.6.2.1965 ONLY
\word{:} \word{ONLY} \word{p} -{}- ) -1 \word{SET-ORDER} \word{;}
\end{implement}
\begin{testing} % T.16.6.2.1965 ONLY
\ttfamily
\test{\word{ONLY} \word{FORTH} \word{GET-ORDER}}{get-orderlist}
\word{:} so1 \word{SET-ORDER} {;} \word{bs} \textdf{In case it is unavailable in the forth wordlist}
\test{\word{ONLY} \word{FORTH-WORDLIST} 1 \word{SET-ORDER} get-orderlist so1}{} \\
\test{\word{GET-ORDER}}{get-orderlist}
\end{testing}
\end{worddef}
\begin{worddef}{1985}{ORDER}
\item \stack{}{}
Display the word lists in the search order in their search order
sequence, from first searched to last searched. Also display the
word list into which new definitions will be placed. The display
format is implementation dependent.
\word{ORDER} may be implemented using pictured numeric output
words. Consequently, its use may corrupt the transient region
identified by \word[core]{num-end}.
\see \xref[3.3.3.6 Other Transient Regions]{usage:transient}.
\begin{testing} % T.16.6.2.1985 ORDER
\ttfamily
\word{CR} \word{.p} ONLY FORTH DEFINITIONS search order and compilation list) \word{CR} \\
\test{\word{ONLY} \word{FORTH} \word{DEFINITIONS} \word{ORDER}}{}
\word{CR} \word{.p} Plus another unnamed wordlist at head of search order) \word{CR} \\
\test{alsowid2 \word{DEFINITIONS} \word{ORDER}}{}
\end{testing}
\end{worddef}
\begin{worddef}{2037}{PREVIOUS}
\item \stack{}{}
Transform the search order consisting of \param{wid_n}, {\ldots}
\param{wid_2}, \param{wid_1} (where \param{wid_1} is searched
first) into \param{wid_n}, {\ldots} \param{wid_2}. An ambiguous
condition exists if the search order was empty before
\word{PREVIOUS} was executed.
\begin{implement} % I.16.6.2.2037 PREVIOUS
\word{:} \word{PREVIOUS} \word{p} -{}- )
\word{GET-ORDER} \word{NIP} \word{1-} \word{SET-ORDER}
\word{;}
\end{implement}
\end{worddef}