I've only briefly looked this over, but it seems to me that you've misunderstood
how the switch-case/range-break-end block works.
You define #switch (trigger) - which uses a variable value "trigger" for the
rest of the case/range block to operate on.
Then every case () or range () directive is set up to operate on a specific
value of "trigger" or range of "trigger" values.
#break directives end each sub-block.
Then there's a catch-all else, then the end.
So,
#declare Clock = clock;
#switch (Clock)
#case (0.1)
#debug "The clock is at 0.1 \n"
#break
#case (0.2)
#debug "The clock is at 0.2 \n"
#break
#case (0.3)
#debug "The clock is at 0.3 \n"
#break
#case (0.4)
#debug "The clock is at 0.4 \n"
#break
#case (0.5)
#debug "The clock is at 0.5 \n"
#break
#else
#debug "The clock is over 0.5... \n"
#end
Post a reply to this message
|