|
|
This is more strange than I thought.
Compare these two #for-loop examples. The first is my modified version-- fatal
error; the 2nd is almost identical to the doc's example, which *does* at least
parse OK. The only difference is where the #debug(...) is placed. The 1st
version is kind of like your #macro, with the inner #else actually being used
for something; the 2nd makes no use of the #else, and successfully parses. I
have no idea as to why there should be a difference.
// [doc's version, slightly modified]
#local R = seed(4711);
#for (I, 1, 100)
#if (rand(R) < 1.1) // always less than 1.1
#break // terminate loop early
#else
#debug concat(str(I,0,0), " iterations and counting\n")
#end
#end
// [doc's version, almost as-is]
#local R = seed(4711);
#for (I, 1, 100)
#if (rand(R) < 1.1)
#break // terminate loop early
#else
#end
#debug concat(str(I,0,0), " iterations and counting\n")
#end
Post a reply to this message
|
|