Can't get sequential single line "if" statements to work

jerryb

New Member
Licensed User
(Warning: newby post!)
Apologies if this is already known but it appears to me that if you have several single line IF statements in sequence then only the first one is evaluated! The rest are skipped over. eg:

If A = B then ....
If D = E then ....
whatever ....

Only the first IF gets evaluated. The program then skips to the line following the last IF of the sequence. In the example above the second line doesn't get executed.

This is using the ide. Don't know if it works compiled or not.

Converting to multi-line IF statements gets round the problem.
I'm using v6.9.
 

jerryb

New Member
Licensed User
Are you sure that the lines are really skipped?
There is a known issue with the debugger which sometimes doesn't break in similar cases.
Hi Erel. I've just been doing some more investigating and it seems to me that you're sort of right.

In fact it's just that if I single step through the code using F8 then it doesn't stop on any subsequent IF statement (after a previous IF) - so long as the IF evaluates to FALSE!

IE:
XX = 1
YY = 1
If XX = 2 Then XX = 1
'doesn't matter how this IF evaluates
If YY = 2 Then YY = 1 'WON'T stop here on single step

But:
XX = 1
YY = 1
If XX = 2 Then XX = 1
If YY = 1 Then YY = 1
'WILL stop here on single step

I Assume this is the bug you know about. Sorry for the false alarm.
 
Top