Forth does not prevent you from shooting yourself in the foot. Let’s try a few ways to crash Gforth:
0 0 ! here execute ' catch >body 20 erase abort ' (quit) >body 20 erase
The last two examples are guaranteed to destroy important parts of
Gforth (and most other systems), so you better leave Gforth afterwards
(if it has not finished by itself). On some systems you may have to
kill gforth from outside (e.g., in Unix with
You will find out later what these lines do and then you will get an idea why they produce crashes.
Now that you know how to produce crashes (and that there’s not much to them), let’s learn how to produce meaningful programs.