Sujet : Re: THROW codes and ambiguous conditions
De : sean (at) *nospam* conman.org
Groupes : comp.lang.forthDate : 06. Jun 2025, 22:06:51
Autres entêtes
Organisation : Conman Laboratories
Message-ID : <101vl9b$2fvp7$1@dont-email.me>
References : 1 2 3 4 5
User-Agent : tin/2.4.0-20160823 ("Octomore") (UNIX) (Linux/2.6.9-100.EL.plus.c4smp (i686))
It was thus said that the Great
albert@spenarnc.xs4all.nl once stated:
In article <101u12p$23a54$1@dont-email.me>, <sean@conman.org> wrote:
Such as? One goal (which kind of went to the wayside as I was writing)
was to use as much of standard Forth as possible to write the code (and less
to implement in assembly), thus the inclusion of AHEAD, CS-ROLL, etc. But
once I past 8K with pretty much CORE, CORE-EXT, SEARCH, SEARCH-EXT and the
ones I was using from TOOLS-EXT, I had past 8K, so I decided I might as well
include DOUBLE, DOUBLE-EXT, STRING, STRING-EXT, LOCAL and LOCAL-EXT. At
that point, I might as well make a Forth that was useful for as many people
as possible, while not locking it into a particular system. That's why I
didn't bother with BLOCK, BLOCK-EXT, FACILITY or FACILITY-EXT (leaving that
for the others to write for their system).
Adding more wordsets is not making it useful for as many people as possible.
Leaving out the FACILTY wordset ( SEE DUMP WORDS LOCATE) make a system
virtually unusable.
Um, FACILITY does not include SEE, DUMP, or WORDS, and LOCATE isn't in ANS
Forth. They are in TOOLS, which I included (and SEE is the longest bit of
code in my Forth).
Using BLOCKS to store all words that belong in a library, that I found extremely
useful. ( WANT ).
Okay, what system should I support for BLOCKS? The Tandy Color Computer?
The Dragon? OS-9? NitrOS? Flex? Fuzix? There are quite a few out there
and I don't have access to all of them.
Adding D2/ D2* D2> 2VARIABLE is in bad taste. They clutter up the output of
WORDS. Try WORDS in gforth. Can you even check D2* is in there?
Of course traditional formatting words require certain DOUBLE words.
I have. And yes, it's a ton of words. A goal of my Forth system was to
only have standard Forth words. Here's the output:
UNESCAPE SUBSTITUTE REPLACES SLITERAL SEARCH COMPARE CMOVE> CMOVE BLANK
/STRING -TRAILING PREVIOUS ORDER ONLY FORTH ALSO WORDLIST SET-ORDER
SET-CURRENT SEARCH-WORDLIST GET-ORDER GET-CURRENT FORTH-WORDLIST FIND
DEFINITIONS [UNDEFINED] [THEN] [IF] [ELSE] [DEFINED] TRAVERSE-WORDLIST
STATE NR> NAME>STRING NAME>INTERPRET NAME>COMPILE N>R CS-ROLL CS-PICK BYE
AHEAD WORDS SEE DUMP ? .S {: LOCALS| (LOCAL) ABORT" ABORT THROW CATCH DU<
2VALUE 2ROT M+ M*/ DNEGATE DMIN DMAX DABS D>S D= D< D2/ D2* D0= D0< D.R D.
D- D+ 2VARIABLE 2LITERAL 2CONSTANT \ [COMPILE] WITHIN VALUE UNUSED U> U.R
TUCK TRUE TO SOURCE-ID SAVE-INPUT S\" ROLL RESTORE-INPUT REFILL PICK
PARSE-NAME PARSE PAD OF NIP MARKER IS HOLDS HEX FALSE ERASE ENDOF ENDCASE
DEFER@ DEFER! DEFER COMPILE, CASE C" BUFFER: AGAIN ACTION-OF ?DO <>
:NONAME 2R@ 2R> 2>R 0> 0<> .R .( ] [CHAR] ['] [ XOR WORD WHILE VARIABLE
UNTIL UNLOOP UM/MOD UM* U< U. TYPE THEN SWAP SPACES SPACE SOURCE SM/REM
SIGN S>D S" RSHIFT ROT REPEAT RECURSE R@ R> QUIT POSTPONE OVER OR NEGATE
MOVE MOD MIN MAX M* LSHIFT LOOP LITERAL LEAVE KEY J INVERT IMMEDIATE IF I
HOLD HERE FM/MOD FILL EXIT EXECUTE EVALUATE ENVIRONMENT? EMIT ELSE DUP
DROP DOES> DO DEPTH DECIMAL CREATE CR COUNT CONSTANT CHARS CHAR+ CHAR CELLS
CELL+ C@ C, C! BL BEGIN BASE AND ALLOT ALIGNED ALIGN ACCEPT ABS @ ?DUP >R
>NUMBER >IN >BODY > = <# < ; : 2SWAP 2OVER 2DUP 2DROP 2@ 2/ 2* 2! 1- 1+ 0=
0< /MOD / ." . - , +LOOP +! + */MOD */ * ( ' #S #> # !
I wasn't sure if it was needed or not. It just falls pack to PICK anyway.
You can be sure if you needs it, if you use your forth to program, not?
I have XOR, but I've yet to use it. Should I not have included that one?
-spc