Hi forum,
Long time Inform fan, first time poster.
I have a little bit of a weird question. At about line 3206 of the parserm.h file provided with Inform Release 6/11 – Serial number 040227… I find the following code:
for (i=0 : i<number_matched : i++) match_classes-->i = 0;
n = 1;
for (i=0 : i<number_matched : i++)
if (match_classes-->i == 0) {
match_classes-->i = n++; flag = 0;
for (j=i+1 : j<number_matched : j++)
if (match_classes-->j == 0 && Identical(match_list-->i, match_list-->j) == 1) {
flag=1;
match_classes-->j = match_classes-->i;
}
if (flag == 1) match_classes-->i = 1-n;
}
n--; number_of_classes = n;
Near as I can tell, this code is just taking a bunch of possible matches and attempting to group the matches by class and similarity, or something.
However, when I debug this code during runtime, I find that the outermost for loop is being executed only one single time.
I cannot figure this out. It appears that match_classes should look something like this where number_matched == 17 :
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17]
But it does not. Running in Frotz V2.43, it instead looks like this:
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
What is going on here?