Hello all.
I seem to have found one very peculiar behaviour of the If … construct. I noticed it in a much larger (and more useful, I hope ;-) macro but I seem to have tracked it down to just the following (if I remove the code in the sub-sections, this doesn't happen):
Now, what happens is this: If the macro is run as it is, both the If in section A and the Else If in Section B are executed, when, of course, only section A should. (Please ignore the sub-sections for now. Also, the dialogues have the Block next actions… option checked, so that none of them is missed.) If the condition in the Else If in section B is changed to a = 1, then sections A and C are executed, which is also wrong as again only A should.
As I said, the code in the sub-sections, though it doesn't do anything, must be there for either of the two errors mentioned above to appear; otherwise, the If construct functions normally. In A1, as far as I could find – and I spent a few good hours messing about with all possibilities – the Else If condition must be a = x, where x is any value but 0. In C1, the If / Else If / End If must be there for the errors to occur, but the values variable a is compared with don't matter.
Can anyone figure this one out?
Last edited: