Thanks, Wade.
Actually, I didn’t use the example’s code “as is”. This is the code I used:
To UpShift:
let St be “gnou”;
let N be 2;
replace the character number N in St with “l”;
say “[St]”;
In my opinion, this should change the string “gnou” to “glou” but it doesn’t even compile and I get the following error message:
Problem. In ‘replace the character number N in St with “l”’, the phrase ‘character number N in St’ doesn’t seem to fit: I was hoping it would be a snippet, but in fact it’s a text.
I was trying to match this phrase:
character number (n - number) in (st - text)
I recognised:
n = a temporary named value , holding a number
st = a temporary named value , holding a text
Because of this problem, the source could not be translated into a working game. (Correct the source text to remove the difficulty and click on Go once again.)
Omit the the. The phrase is replace character number <number> in <text> with <text>, and you can’t insert an article between adjacent words of the phrase: I7 is just as unforgiving of replace the character number as it would be of replace character the number.
You can say replace character number the N in the St with the “l”; because all of those the's are before parameters.