Inform 6 code in Inform 7: semi-newbie question

I managed to find another solution to what I wanted to do, but I’m still confused why this doesn’t work.

auto.inf places the “Global myCheck” code after the “if the check worked” code in auto.inf, and the result is, the below text won’t compile.

Is there a reasonable way around this besides not using globals? I guess I’m confused as to how I7 munges auto.inf to send it to i6. There are going to be times when I don’t see any way around using a global when mixing i6 and i7, even though I’m trying my best to steal/learn i6 from other source code & examples.

[code]“ynx” by Andrew Schultz

room 1 is a room.

when play begins:
if the check worked:
say “!!”;
else:
say “??”;

volume yes-no substitutes

include (-

Global myCheck = false;

-)

To decide whether the check worked:
(- (myCheck ~= true) -)
[/code]

Thanks!

You can include a section of I6 code at a particular point in the library.

Include (-
    global foo = 1;
-) after "Definitions.i6t".

Oh, right! Now that you mention it, it seems obvious. I’ve used “after” before in other places, but I never made the connection.

Thanks so much!