Free since 2005 · No login required
AT

Academic Tutorials

Learn at your own pace

site-mobile-top-banner · 320x50

When I redefine a word, old uses refer to the old definition. How do I ...?

That behaviour is known as early binding (of names), and it is a feature: E.g., name collisions are mostly harmless in Forth, unlike most other languages. So how do I change a word during debugging? The typical approach is to completely reload the program; the memory for the old version is usually reclaimed either by exiting and restarting the system, or by using MARKERs. Since Forth systems start up and compile very fast (in the 0.1s ballpark), that does not break the workflow.