16.6.2.0715 ALSO SEARCH EXT
Transform the search order consisting of widn, ... wid2, wid1 (where wid1 is searched first) into widn, ... wid2, wid1, wid1. An ambiguous condition exists if there are too many word lists in the search order.
Implementation:
Testing:
ContributeContributions
AtH
[70] ALSO without VOCABULARY Request for clarification2018-09-18 12:51:27
Can someone provide an example, how to add a wordlist in the search order with the help of ALSO ?
In good old times we wrote VOCABULARY EDITOR … ONLY FORTH ALSO EDITOR
Now, when VOCABULARY is not in the Standard, we write WORDLIST CONSTANT EDITOR and what? GET-ORDER EDITOR SWAP 1+ SET-ORDER doesn’t require ALSO
MaximeBouillot
[447] What should happen when calling ALSO when the search order is empty?Request for clarification2026-09-11 11:39:32
It's mentioned that there is only an ambiguous condition if the search order is full. But I don't understand what would happen if the search order is empty.
The proposed implementation doesn't seem to handle that case gracefully.
ruv
[448] Udate reference implementation for `ALSO`Suggested reference implementation2026-09-12 15:19:31
The original reference implementation does not handle the case where the search order is empty.
: ALSO ( -- )
GET-ORDER DUP 0= IF -50 THROW THEN
OVER SWAP 1+ SET-ORDER
;
NB: the search order overflow should be checked in set-order.
See also: the section 16.4.1.2 Ambiguous conditions, Table 9.1, and contribution #447.