Greetings,
I have been wrestling with this a number of days. I have done multiple searches on the Web and found no answers:
The OR statement from a manual:
or
Returns the bitwise logical OR of the integers val1 through val9.
$(or, val1 [, val2,..., val9])
Here is a snippet of a diesel macro that works correctly:
^C^C$M=$(if,$(=,$(getenv,test),4),.setenv;evenodd;even,.setenv;evenodd;odd)
If I do
setenv->test->4
from the Autocad Command line, the command makes evenodd->even
If I change
setenv->test->5
from the Autocad Command line, the command makes evenodd->odd
That works fine as expected.
Now when I try to introduce OR, things get messed up. I am clearly not using it correctly:
The following Diesel Macro, though not showing any errors when macrotrace is set to 1, always sets evenodd to odd. What I want is for evenodd to be even if test is either 0 or 2
^C^C$M=$(if,$(=,$(getenv,test),$(or,0,2)).setenv;evenodd;even,.setenv;evenodd;odd)^C
It is obvious that I am doing something wrong but not obvious to me what it is.
Thanks for any help,
Doug