2024-02-28 01:35:20 is it normal to terminate linked lists with 0 in forth? 2024-02-28 01:35:37 or do forth people prefer another convention? 2024-02-28 01:39:37 because i just encountered an interesting bug in mine. i use a scratch pad that i allocated at the beginning of the dictionary, which means that when something is allocating objects in scratch space and linking them together, a rollover can return 0 which looks like a list terminator instead of a valid objecr address 2024-02-28 01:40:58 i solved it for now by just starting virtual memory at 1k, but i'm wondering whether i should just break this habit entirely 2024-02-28 10:45:36 I usually use 0. If that "link" is an index rather than an actal address it keeps you from being able to point at item 0 of an array, but my links are usually actual addresses. 2024-02-28 10:53:35 you can also make sure each successive item has a higher address than the last when you transverse them if that is what is expected 2024-02-28 10:55:33 I had a linked list go bonkers in a 6502 forth since some vocabularies had been removed but the pointers were left in place. the list searching code took the garbage pointed to by the address to be addresses and jumped around memory until it found a place where the next address was itself which made it hang 2024-02-28 11:04:17 0 is easiest option really, also there's usually an address in a variable that sets what range of the dictionary is protected from being forgotten 2024-02-28 12:24:43 zelgomer: in my konilo system, the fll: vocabulary (forward linked list) uses a specific address (for a word named `END`); in the dictionary headers, I use a 0. 2024-02-28 14:32:46 i see. thanks, guys 2024-02-28 14:38:20 looking at Arland's code for fll:, it appears he just uses the END word for readability purposes, so it could just be bound to 0 (by creating END as `#0 \END`). I'll suggest doing this when he next updates the code.