What is Nostr?
Wintermute_BBS /
npub1nj6…92wj
2023-05-07 16:21:05

Wintermute_BBS on Nostr: This is a call for help / verification on an alleged #Bug which I may have found in a ...

This is a call for help / verification on an alleged #Bug which I may have found in a #Forth #Programming tutorial online.

It's at beginner level, a bug in an exercise with regards to "flexible arrays".

The original code example and results are shown in the first two screenshots, but I'm dang sure this won't work as there's a 'rot' statement missing eventually resulting in a wrong return address.

When running the original example code, I get addresses with a 1 byte spacing for each array element. This can't be correct.

The last two screenshots show the fixed code with the missing 'rot' command added.

When running the second, fixed example, I get addresses that are spaced by 5 cells (5 * 2 byte). This is what I would expect.

Links:

* Original online version of the tutorial code: http://www.forth.org/svfig/Len/arrays.htm







Author Public Key
npub1nj6wze7czzc8hmgc5pgvgusyawfg9sjf377kywq08kgjxxjw98rq2w92wj