This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

for loop not executing

Good Day, i am writing a code for a density based traffic light project using for loops for the density part of the system, but my for loops wont execute. the code is attached below.

Parents
  • thus any difficulty reading is likely to reduce the answers

    Agreed, but I have to admit to finding it very odd that someone could find the time to write so much about formatting and tabs and editors while not spending very little time looking at the code.

    It's so blatantly obvious that the OP is new to this stuff. IMO they deserve a little break; which is why I tried to give a sensible response instead of going on about editors [face-palm]

Reply
  • thus any difficulty reading is likely to reduce the answers

    Agreed, but I have to admit to finding it very odd that someone could find the time to write so much about formatting and tabs and editors while not spending very little time looking at the code.

    It's so blatantly obvious that the OP is new to this stuff. IMO they deserve a little break; which is why I tried to give a sensible response instead of going on about editors [face-palm]

Children
  • Agreed, but I have to admit to finding it very odd that someone could find the time to write so much about formatting and tabs and editors while not spending very little time looking at the code.

    the issue is not what takes the most time (BTW you are reversed in that) but the fact that readable code is even a benefit to the OP.

    there has been cases where the result of an OP being advised to "line up" the code has resulted in the OP posting "OH, now I see"

    anyhow, I have a suspicion

    WHICH CHIP?

  • Indeed - hence taking the time to explain to them why the layout had gone haywire, how to fix it, and how to avoid it happening again in the future.

  • BTW you are reversed in that

    Not sure what you're meaning by that. But hey-ho.

    there has been cases where the result of an OP being advised to "line up" the code has resulted in the OP posting "OH, now I see"

    Of course, a very valid point. But we don't know what the code looks like on the OP's computer (though I'd hazard a guess that it's not as bad as this Keil forum likes to make things). Again, in this instance, there's so little there. The basic code structure is simple. Really, really, really, really simple. Way simpler than much of the really badly formatted tosh that sometimes appears here. Way simpler than much of the well formatted tosh that sometimes appears here.

    Yes, I'll say it. I guess I just have an aversion to OTT (aka anal) responses.

    WHICH CHIP?

    Yes, a very appropriate question.