Lab is a room.
When play begins:
let C be "1234567890123456789012 123456789012345678901234567890123";
let commandWord be "xyzzy";
repeat with CWI running from 1 to the number of words in C:
now commandWord is word number CWI in C;
say "Word [CWI] is: [commandWord].";
produces a BlkValueWrite: writing to index out of range error. A similar error can occur looping over lines instead of words when going from a shorter line to a longer line.
Include (-
Replace TEXT_TY_BlobAccess;
-) after "Definitions.i6t".
Include(-
[ TEXT_TY_BlobAccess txt blobtype ctxt wanted rtxt
p1 p2 cp1 cp2 r;
if (txt==0) return 0;
if (blobtype == CHR_BLOB) return TEXT_TY_CharacterLength(txt);
cp1 = txt-->0; p1 = TEXT_TY_Temporarily_Transmute(txt);
cp2 = rtxt-->0; p2 = TEXT_TY_Temporarily_Transmute(rtxt);
TEXT_TY_Transmute(ctxt);
! ########### insertion begins ###########
if (ctxt) BlkMakeMutable(ctxt);
! ########### insertion ends ###########
r = TEXT_TY_BlobAccessI(txt, blobtype, ctxt, wanted, rtxt);
TEXT_TY_Untransmute(txt, p1, cp1);
TEXT_TY_Untransmute(rtxt, p2, cp2);
return r;
];
-) after "Output.i6t".