0 SET-ORDER why?

Liste des GroupesRevenir à cl forth 
Sujet : 0 SET-ORDER why?
De : krishna.myneni (at) *nospam* ccreweb.org (Krishna Myneni)
Groupes : comp.lang.forth
Date : 26. Jun 2024, 00:25:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <v5fjkr$1p13i$1@dont-email.me>
User-Agent : Mozilla Thunderbird
Why is 0 a valid argument to SET-ORDER (from the optional Search-Order word set)? It can leave a Forth system in a non-recoverable state.
---
16.6.1.2197
SET-ORDER ( widn . . . wid1 n – – )
Set the search order to the word lists identified by widn . . . wid1. Subsequently, word list wid1 will be searched first, and word list widn searched last.
If n is zero, empty the search order.
If n is minus one, set the search order to the implementation-defined minimum search order. The minimum search order shall include the words FORTH-WORDLIST and SET-ORDER.
A system shall allow n to be at least eight.
---
Sentences are separated for emphasis: "If n is zero, empty the search order."  Why?
In kForth (32/64), the sequence
0 SET-ORDER
leaves the Forth system in a non-recoverable state, and I have to use Ctrl-C to break out back to the OS shell. This appears to be true in Gforth as well, although Gforth traps Ctrl-C, so maybe one has to kill the process from another shell.
See the examples below.
-- Krishna Myneni
=== kForth example ===
kForth-64 v 0.4.5 (Build: 2024-03-30)
Copyright (c) 1998--2023 Krishna Myneni
Contributions by: dpw gd mu bk abs tn cmb bg dnw imss
Provided under the GNU Affero General Public License, v3.0 or later
Ready!
order    \ upon startup without command line args
[Forth]  Root   ok
\ set to the system's minimum search order (see 16.6.2.1965)
only
  ok
order
Root   ok  \ minimum search order only contains the root wordlist
\ words in the root wordlist
words
5 words.
ORDER          SET-ORDER      FORTH-WORDLIST FORTH          WORDS
  ok
\ we can recover with the word FORTH (16.6.2.1590)
forth
  ok
order
[Forth]  Root   ok  \ back to startup state
only
  ok
order
Root   ok
\ What does 0 SET-ORDER do?
0 set-order
  ok
order   \ the word ORDER is no longer in the search order
ORDER
Line 10:  VM Error(-13): Undefined word
order
forth   \ the word FORTH is no longer in the search order
FORTH
Line 11:  VM Error(-13): Undefined word
forth
bye
BYE     \ we can't get back to OS shell without Ctrl-C
Line 12:  VM Error(-13): Undefined word
bye
=== end of kForth example ===
=== Gforth example ===
Gforth 0.7.9_20220120
Authors: Anton Ertl, Bernd Paysan, Jens Wilke et al., for more type `authors'
Copyright © 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `help' for basic help
   ok
order Forth Forth Root     Forth  ok  \ on startup
only  ok   \ minimum search order ?
order Root Root     Forth  ok
\ words in the Root wordlist
words
order set-order forth-wordlist Forth words  ok
forth  ok
order Forth Root     Forth  ok  \ recovered but different from startup
only  ok
order Root Root     Forth  ok
0 set-order  ok
order    \ ORDER is no longer in the search order
*the terminal*:11:1: error: Undefined word
 >>>order<<<
Backtrace:
kernel/int.fs:321:10:                    0 $7F0DAB00C3A0 throw
forth   \ FORTH is no longer in the search order
*the terminal*:12:1: error: Undefined word
 >>>forth<<<
Backtrace:
kernel/int.fs:321:10:                    0 $7F0DAB00C3A0 throw
bye     \ BYE is no longer in the search order
*the terminal*:13:1: error: Undefined word
 >>>bye<<<
Backtrace:
kernel/int.fs:321:10:                    0 $7F0DAB00C3A0 throw
\ Ctrl-C does not return to OS shell (trapped by Gforth)
*the terminal*:13:1: error: User interrupt                         |o:   Forth
 >>>bye<<<
Backtrace:
kernel/input.fs:216:30:                  0 $7F0DAB019438 throw
kernel/input.fs:216:36:                  1 $7F0DAB00E348 get-input-colored
except.fs:83:2:                          2 $7F0DAB024DD8 execute  [catch frame]
kernel/int.fs:654:5:                     3 $7F0DAB00DE38 catch
                                          4 $7F0DB903FFC0
kernel/int.fs:658:5:                     5 $7F0DAB00DEA0 bt-rp0-catch
=== end of Gforth example ===

Date Sujet#  Auteur
26 Jun 24 * 0 SET-ORDER why?64Krishna Myneni
26 Jun 24 +* Re: 0 SET-ORDER why?3minforth
26 Jun 24 i+- Re: 0 SET-ORDER why?1albert
26 Jun 24 i`- Re: 0 SET-ORDER why?1Krishna Myneni
26 Jun 24 `* Re: 0 SET-ORDER why?60Anton Ertl
26 Jun 24  +* Re: 0 SET-ORDER why?26dxf
26 Jun 24  i`* Re: 0 SET-ORDER why?25Ruvim
27 Jun 24  i +* Re: 0 SET-ORDER why?9dxf
27 Jun 24  i i+* Re: 0 SET-ORDER why?2Gerry Jackson
28 Jun 24  i ii`- Re: 0 SET-ORDER why?1dxf
28 Jun 24  i i`* Re: 0 SET-ORDER why?6Ruvim
28 Jun 24  i i +* Re: 0 SET-ORDER why?4dxf
28 Jun 24  i i i`* Re: 0 SET-ORDER why?3Ruvim
28 Jun 24  i i i `* Re: 0 SET-ORDER why?2dxf
1 Jul 24  i i i  `- Re: 0 SET-ORDER why?1dxf
29 Jun 24  i i `- Re: 0 SET-ORDER why?1dxf
27 Jun 24  i `* Re: 0 SET-ORDER why?15Gerry Jackson
27 Jun 24  i  +* Re: 0 SET-ORDER why?2albert
27 Jun 24  i  i`- Re: 0 SET-ORDER why?1minforth
27 Jun 24  i  +- Re: 0 SET-ORDER why?1dxf
27 Jun 24  i  +* Re: 0 SET-ORDER why?7Krishna Myneni
27 Jun 24  i  i+* Re: 0 SET-ORDER why?4Krishna Myneni
27 Jun 24  i  ii+* Re: 0 SET-ORDER why?2Gerry Jackson
28 Jun 24  i  iii`- Re: 0 SET-ORDER why?1Krishna Myneni
28 Jun 24  i  ii`- Re: 0 SET-ORDER why?1dxf
29 Jun 24  i  i`* Re: 0 SET-ORDER why?2Krishna Myneni
30 Jun 24  i  i `- Re: 0 SET-ORDER why?1albert
28 Jun 24  i  `* Re: 0 SET-ORDER why?4Ruvim
28 Jun 24  i   +* Re: 0 SET-ORDER why?2albert
28 Jun 24  i   i`- Recognizer protocol (was: 0 SET-ORDER why?)1Ruvim
4 Jul 24  i   `- Re: 0 SET-ORDER why?1Gerry Jackson
26 Jun 24  +* Re: 0 SET-ORDER why?3albert
26 Jun 24  i+- Re: 0 SET-ORDER why?1minforth
26 Jun 24  i`- Re: 0 SET-ORDER why?1Krishna Myneni
26 Jun 24  `* Re: 0 SET-ORDER why?30Krishna Myneni
28 Jun 24   `* Re: 0 SET-ORDER why?29Anton Ertl
28 Jun 24    +- Re: 0 SET-ORDER why?1Hans Bezemer
29 Jun 24    `* Re: 0 SET-ORDER why?27Krishna Myneni
30 Jun 24     `* Re: 0 SET-ORDER why?26dxf
30 Jun 24      `* Re: 0 SET-ORDER why?25Krishna Myneni
30 Jun 24       `* Re: 0 SET-ORDER why?24Krishna Myneni
30 Jun 24        `* Re: 0 SET-ORDER why?23minforth
30 Jun 24         `* Re: 0 SET-ORDER why?22Krishna Myneni
30 Jun 24          `* Re: 0 SET-ORDER why?21minforth
1 Jul 24           `* Re: 0 SET-ORDER why?20Krishna Myneni
1 Jul 24            +* Re: 0 SET-ORDER why?2mhx
1 Jul 24            i`- Re: 0 SET-ORDER why?1Krishna Myneni
1 Jul 24            `* Re: 0 SET-ORDER why?17Ruvim
1 Jul 24             +* Re: 0 SET-ORDER why?12Krishna Myneni
1 Jul 24             i+* Re: 0 SET-ORDER why?6dxf
2 Jul 24             ii+- Re: 0 SET-ORDER why?1dxf
3 Jul 24             ii`* Re: 0 SET-ORDER why?4Krishna Myneni
3 Jul 24             ii `* Re: 0 SET-ORDER why?3dxf
3 Jul 24             ii  `* Re: 0 SET-ORDER why?2albert
3 Jul 24             ii   `- Re: 0 SET-ORDER why?1dxf
1 Jul 24             i+* Re: 0 SET-ORDER why?3albert
2 Jul 24             ii`* Re: 0 SET-ORDER why?2sjack
2 Jul 24             ii `- Re: 0 SET-ORDER why?1dxf
2 Jul 24             i`* Re: 0 SET-ORDER why?2Ruvim
3 Jul 24             i `- Re: 0 SET-ORDER why?1Krishna Myneni
21 Sep 24             `* Re: 0 SET-ORDER why?4Anthony Howe
22 Sep 24              `* Re: 0 SET-ORDER why?3Ruvim
22 Sep 24               `* Re: 0 SET-ORDER why?2Anthony Howe
22 Sep 24                `- Re: 0 SET-ORDER why?1Ruvim

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal