September 30, 200520 yr The following is the logic I need inside one mouse area:If VarA = 0 and VarB = 0, then set VarA = 1 and VarB = 1,else if VarA = 1 and VarB = 1, then set VarA = 0 and VarB = 0,else if VarA = 1 and VarB = 0, then set VarB = 1.One of the three statements will always be true.The following is my XML attempt to follow the above logic:(L:VarA, bool) ! ; (L:VarB, bool) ! ; &&if{ 1 (>L:VarA, bool) ; 1 (>L:VarB, bool) }els{ (L:VarA, bool) != ; (L:VarB, bool) != ; &&if{ 0 (>L:VarA, bool) ; 0 (>L:VarB, bool) } }els{ (L:VarA, bool) != ; (L:VarB, bool) ! ; &&if{ 1 (>LVarB, bool) } }The first level works, ie, when A and B both equal zero, they get reset to one. After that, nothing works.If the nested statements are not permissible, what about this:if VarA = 0 and VarB = 0, then set VarA = 1 and VarB = 1, goto g0if VarA = 1 and VarB = 1, then set VarA = 0 and VarB = 0, goto g0if VarA = 1 and VarB = 0, then set VarB = 1Once a true statement is found, then the goto jumps the remainingstatements to prevent them from being acted upon. Any comments appreciated.Glenn
September 30, 200520 yr Hi,Try (not tested):(L:VarA, bool) ! (L:VarB, bool) ! and if{ 1 (>L:VarA, bool) 1 (>L:VarB, bool) } els{ (L:VarA, bool) (L:VarB, bool) and if{ 0 (>L:VarA, bool) 0 (>L:VarB, bool) } els{ (L:VarA, bool) (L:VarB, bool) ! and if{ 1 (>LVarB, bool) } } } Jan"Beatus Ille Procul Negotiis" Jan "Beatus ille qui procul negotiis..."
September 30, 200520 yr All three levels now work great. Thanks so much.One of the problems I have learning XML is spaces. The presence (or lack) of a space is not alway clear when reading code because different font types show spaces in varying width. Because space requirements are so exact in XML, I think having a visiblecharacter (~, maybe) instead of a space would make code easier to learn.Glenn
Create an account or sign in to comment