The main change is to complain on names longer than 31 chars (feel free to suggest a better error message).
I also switched the error string encoding to hi-bit terminated instead of null terminated to save some bytes. Another option if you don't like the hi-bit .shift thing would be to use the difference in pointers between adjacent string table entries like I did as part of simplifying/shortening environment?.
After the changes the net image size is 26 bytes smaller.
I tested manually like this:
Tali Forth 2 comes with absolutely NO WARRANTY
Type 'bye' to exit
: supercalifragilisticexpialidocious 3 + ; Name too long (max 31)
Is there a good way to do something like that in a unit test?
The main change is to complain on names longer than 31 chars (feel free to suggest a better error message).
I also switched the error string encoding to hi-bit terminated instead of null terminated to save some bytes. Another option if you don't like the hi-bit
.shift
thing would be to use the difference in pointers between adjacent string table entries like I did as part of simplifying/shorteningenvironment?
.After the changes the net image size is 26 bytes smaller.
I tested manually like this:
Is there a good way to do something like that in a unit test?