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

Discussion in 'Bug Reports' started by jerryb, Oct 28, 2010.

  1. jerryb

    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.
     
  2. Erel

    Erel Administrator Staff 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.
     
  3. jerryb

    jerryb New Member Licensed User

    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.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice