Thread View: fj.comp.lang.forth
1 messages
1 total messages
Started by albert albert
Tue, 23 May 2023 10:57
hybrid c/Forth program
Author: albert albert
Date: Tue, 23 May 2023 10:57
Date: Tue, 23 May 2023 10:57
31 lines
2041 bytes
2041 bytes
I have an programmable editor that could benefit of rewritten in Forth. At present it is written in c. Coupling a function to <ESC>A] is remembering the key in a structure and a word that is defined as example cup cup cup cup that moves the cursor up 4 times. It is almost : <ESC>A] cup cup cup cup ; The idea is to couple a Forth with it and migrate piecemeal functions to Forth with it. Forth would have to known only a few datastructures and then be able to perform already a lot of functions. For example knowing the descriptor structure of a file to be edited it could move the cursor up by : cup -1 CURRENTFILE @ files[] @ ->currentline +! ; where CURRENTFILE files are imported from c. As soon as all functions pertaining to e.g. CURRENTFILE are moved, CURRENTFILE is defined within the forth area and deleted from c. In the end only coupling to an X-system library remains, and migrated to dynamic library calls. Has this been done or tried before? Any ideas whether this is feasible? Groetjes Albert -- Don't praise the day before the evening. One swallow doesn't make spring. You must not say "hey" before you have crossed the bridge. Don't sell the hide of the bear until you shot it. Better one bird in the hand than ten in the air. First gain is a cat spinning. - the Wise from Antrim -
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads