AOC 2025 day 3 is when I start to realize that my usual tool sets in #Pascal or #Go have a lot of string handling functions that I just don't see in #Forth. I'm building up some tools and have a few competing versions of tfunctions that either take different approaches, use different parameter formats, and/or return formats. But I don't want to re-implement the left, right, mid string functions without being sure that's the way to go.
I'm getting a lot of "off by one" errors.
Some are caused by my Pascal "it's a subscript, damn it" bias, and others by not using the right looping constructs.
Strings in Forth are a beginning address and a length. The length can be a maximum size available or the length of the current string. There's no dynamism here, nothing like AnsiStrings in #FreePascal. There are some conventional buffers that the standard definitions will not touch (the PAD) and other transient buffers that can be used with care.
'Tis what I signed up for. It's fun. Kinda. :)
#programming