|
|
William F Pokorny <ano### [at] anonymousorg> wrote:
>
> [source code snippet]
> The code above works with the code variations recently posted. However,
> it's admittedly a slap shot. More thought and testing needed.
>
> My quick test as to whether on the right track was to create a scene
> file like jr's original, but with macro internals looking like:
>
> #if (f_)
> #debug "ok.\n"
> #else
> #debug "break.\n"
> #break
> #end
>
> The variation above works for me in all v3.7+ versions I have in hand.
>
Just discovered that the following also produces the error and fails-- unless
the #debug is there. Seems that in this case, the inner #end actually *needs*
something to follow it! I tried adding #break and/or #end here and there
(guesswork!) to try and MAKE it work without the #debug, but no luck so far.
#declare R = seed(4711);
#for (I, 1, 100)
#if (rand(R) < 1.1) // always less than 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
|
|