global unknown word handler?

15 views
Skip to first unread message

craig.c...@gmail.com

unread,
Jul 15, 2018, 10:38:50 AM7/15/18
to pforthdev
Hi,

I was thinking about adding some dynamic word resolution to pforth so I could implement a sort of ed (the standard unix editor) command syntax like n,m<command-letter> and such. I was wondering if a CATCH on say EVALUATE and check for -13 would be a good way or would it be better to implement something in C? Or if there is another way that would be good? I'm just starting to learn forth and really am enjoying it.

Thanks,
Craig

Phil Burk

unread,
Jul 15, 2018, 1:57:05 PM7/15/18
to pforthdev
Hello Craig,

> I'm just starting to learn forth and really am enjoying it.

It's a fun language. A real mind bender.

I was thinking about adding some dynamic word resolution to pforth so I could implement a sort of ed (the standard unix editor) command syntax like n,m<command-letter> and such.

I'm not sure exactly what you are proposing. Would this be active for normal input? Or a special editor that the user would enter?

Is dynamic word resolution like auto-completion.? I always thought it would be nice to be able to enter TAB and have it search the dictionary and fill in as much of the remaining word as possible.

For something like that, EVALUATE would be too late. You may want to vector ACCEPT word. See "fth/history.fth" for an example.

Phil Burk

Reply all
Reply to author
Forward
0 new messages