aboutsummaryrefslogtreecommitdiff
path: root/amforth-6.5/common/lib/forth2012/search/set-order.frt
diff options
context:
space:
mode:
Diffstat (limited to 'amforth-6.5/common/lib/forth2012/search/set-order.frt')
-rw-r--r--amforth-6.5/common/lib/forth2012/search/set-order.frt13
1 files changed, 13 insertions, 0 deletions
diff --git a/amforth-6.5/common/lib/forth2012/search/set-order.frt b/amforth-6.5/common/lib/forth2012/search/set-order.frt
new file mode 100644
index 0000000..5969ea3
--- /dev/null
+++ b/amforth-6.5/common/lib/forth2012/search/set-order.frt
@@ -0,0 +1,13 @@
+\ set a new ORDER stack
+
+: set-order
+ dup 0= if -50 throw then \ no empty search order stack
+ cfg-order set-stack
+;
+
+\ A better check would be
+\ : set-order
+\ dup 0 [ s" wordlists" environment search-wordlist drop execute ] literal
+\ within if cfg-order set-stack else -50 throw then
+\ ;
+\ \ No newline at end of file