Re: Searching the Forth Dictionary

Liste des GroupesRevenir à cl forth 
Sujet : Re: Searching the Forth Dictionary
De : albert (at) *nospam* spenarnc.xs4all.nl
Groupes : comp.lang.forth
Date : 01. Jan 2025, 15:27:42
Autres entêtes
Organisation : KPN B.V.
Message-ID : <nnd$3b149e62$62706881@bd4827c85f35a78b>
References : 1
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <20241231181548.1b36ff52e0c2e65596672f3c@gmail.com>,
Sidney Reilley  <sidney.reilley.ii@gmail.com> wrote:
Eternal Forth noob here. Tired & retired but still at it.
I'm currently playing with pforth. I'm following along this video:
https://youtu.be/qZKXZifB39Y which is using swiftforth. He uses the
word `edit' <filename> to create a file.
>
Is it possible to search a Forth implementation's dictionary to see
if a particular words is built in - like `edit' in this case? TIA ..

The politically correct way is to use WORD and FIND.
Find returns a flag whether the word is found.

You also can type the word. If the Forth crashes, it is found.
(Probably you have not used it correctly.)
------------
~/PROJECT/ciforths/optim/ciforth: lina

80386 ciforth beta 2020Nov09
!
Segmentation fault (core dumped)
--------------
If the Forth stays alive without error, it is found.

It is system dependant, to find out if there is an error.
Some systems have the word "error" or "err" in the response.
A question sign is also in indication.
If you are lucky there is an identification of the error,
such as a number, that you can look up in the documentation.
Examples:

----------
ORANGUTAN
ORANGUTAN ? ciforth ERROR # 12 : NOT RECOGNIZED
----------
ORANGUTAN
ORANGUTAN  ? - unrecognized word!
----------

123ORANG
123ORANG ? ciforth ERROR # 10 : NOT A WORD, NOR A NUMBER OR OTHER DENOTATION
----------

ORANGUTAN
:1: Undefined word

ORANGUTAN<<<
Backtrace:
$7FAF70A5CA68 throw
$7FAF70A72DD0 no.extensions
----------
ORANGUTAN ORANGUTAN ?
----------

ORANGUTAN
Err# -13 ERR: Undefined word.
 -> ORANGUTAN
----------

Hopes this help. Experiment more.

--
Duke
** Bottom-posting, text-only is the netiquette way! **

Groetjes Albert
--
Temu exploits Christians: (Disclaimer, only 10 apostles)
Last Supper Acrylic Suncatcher - 15Cm Round Stained Glass- Style Wall
Art For Home, Office And Garden Decor - Perfect For Windows, Bars,
And Gifts For Friends Family And Colleagues.

Date Sujet#  Auteur
1 Jan 25 * Searching the Forth Dictionary8Sidney Reilley
1 Jan 25 +* Re: Searching the Forth Dictionary6dxf
1 Jan 25 i`* Re: Searching the Forth Dictionary5Sidney Reilley
1 Jan 25 i +* Re: Searching the Forth Dictionary3dxf
1 Jan 25 i i`* Re: Searching the Forth Dictionary2Sidney Reilley
1 Jan 25 i i `- Re: Searching the Forth Dictionary1albert
1 Jan 25 i `- Re: Searching the Forth Dictionary1albert
1 Jan 25 `- Re: Searching the Forth Dictionary1albert

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal