0 Replies Latest reply on Jul 2, 2007 4:34 AM by Psycho_Mantis

    while loop problem (solved)

    Psycho_Mantis
      please take a look at this code:
      It's supposed to make a array that should have a length of 99 (9*11)
      But for some reason, it resets the array every time it goes through the v_nr while loop.

      the program traces this:

      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8
      //and finally this; the last number is the length of the whole array. I'd expect it to be 99.
      0 + 0,0 + 1,0 + 2,0 + 3,0 + 4,0 + 5,0 + 6,0 + 7,0 + 8 9

      Sorry to have bothered you.. I just found out I forgot to reset v_nr!! :S