XOD String bug?

image

In simulation, this code keeps “watch” string in watch node on startup if tweak-boolean is true. If debug starts with tweak-boolean false, the watch will change to “false”.

Once watch node is changed to “false” there is no way to clear it again. Changing tweak-boolean to true does not pass the empty string from if-else-T to if-else-R.

I’m guessing the XString : view() code is checking for string isValid(), which is returning false because the 1st character of the string is NULL because it is a 0-length string. I ran into this problem trying to create a node to solve this: Letter or number adder

yes but not only happens in simulation, when I made a simile 4051
I found that it did not erase and I could add a pin, in this case it returns to false with a valid data in T, for example a space. I did the test with two tweak-string

ps: for an if-else type bool, there is a state, for type number or byte, it takes a zero value, but in the case of string, it should be a null or empty value, but the node should return to generic types.
Either auto should take a null or empty value and clean out.

if I try to simulate accumulate-string with initial value in 00h and if-else in true with null value, accumulate string will not change after entering another value and push.
I also see that if I put a value 00h in accumulate-string the previous value will not be removed after an RST, is this normal?

image

It is the same bug I found in my 1st version of Letter or number adder. String treats 00h as end-of-string, so you don’t want to update cursor when pushing 00h onto string (if (*state->cursor) {state->cursor++;}).

I wish I had known about accumlate-string looking for templates to build Letter or number adder off of…

now if it starts with a null value in if-else it blocks the accumulate-string update

from what I see is a feature that leads to other problems

Interesting…accumulate-string doesn’t even try to update output value when RST is pulsed…it clears string, but doesn’t update output or pulse UPD output pin. I guess that is one way to handle issue that you cannot update output string to empty string…creates odd behavior when implementing backspace option, though…

A test in if-else with NUL '\0' at startup, will show only ', but only at startup