|
|
"Kenneth" <kdw### [at] gmailcom> wrote:
> ---------------------------------
> (The proper way to do it):
> #declare MY_VALUE = 10;
>
> #declare C = 1;
> #while(C < 20)
> #if(even(C))
> #declare MY_VALUE = 33;
> #else
> #declare MY_VALUE = 10;
> #end
> #debug concat("\n","My Value = ",str(MY_VALUE,1,0),"\n")
> #declare C = C + 1;
> #end
(The more efficient way to do it):
#declare C = 1;
#while(C < 20)
#declare MY_VALUE = 10;
#if(even(C))
#declare MY_VALUE = 33;
#end
#debug concat("\n","My Value = ",str(MY_VALUE,1,0),"\n")
#declare C = C + 1;
#end
This is why I have my weird way of doing all of the debugging with that #declare
Verbose = true
so that I just plug all the debugging statements in from the start, and then
when everything works, I just switch them ALL off without any more editing.
Been there, done that, SO many times.
Glad you got your code working and regained your sanity.
Reward yourself with an adult beverage! ;)
Post a reply to this message
|
|