While updating the ‘Command Prompt on Cue’ extension for 6L02 (relevant code), I’ve had to change a text variable that was mapped to I6 to a pure I7 variable, because it would otherwise fails to change the prompt.
This is apparently because the desired prompt value would match that to which the ‘saved optional command prompt’ is initially set.
Test case below – it should change the prompt to “!!!” first, and to "— " second but only changes to "— ".
Toggle is a truth state that varies. The saved optional command prompt is some text that varies. The saved optional command prompt variable translates into I6 as "saved_optional_prompt". Include (- Global saved_optional_prompt = (+ "!!!" +); -) after "Definitions.i6t". When play begins: now the command prompt is ">>> ". Last for reading a command: now the saved optional command prompt is the command prompt; if toggle is false: now the command prompt is "!!!"; otherwise: now the command prompt is "--- "; say "([command prompt])"; continue the action. First after reading a command: now the command prompt is the saved optional command prompt. After waiting for two turns: now toggle is true. Prompting is a room. test me with "z / z / z".
If, however, you make ‘the saved optional command prompt’ in the example above a pure I7 variable, it works fine.
Is that a bug ? A reference counting issue ? Something expected ?