octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59616] nested while cant detect parameter cha


From: Rik
Subject: [Octave-bug-tracker] [bug #59616] nested while cant detect parameter change
Date: Thu, 3 Dec 2020 20:01:10 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36

Update of bug #59616 (project octave):

                  Status:                    None => Invalid                
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #1:

The code is working properly.  You initialize u to the value of 1 and then
enter the first while loop.  In the second while loop you print the value of
u, but do not change it.  The value of u (1) is printed 16 x 16 x (176/16) =
2,816 times and then the inner while loop completes.

u is then incremented by 16 and the first while loop starts again.  It prints
the value of u (17) and then checks the condition for the innerwhile loop. 
Because v has not been changed, it is already larger than 176 from the first
time through the while loop and so it is never executed.  The outer while loop
continues incremented u by 16 for each round.  The last bits of output on my
screen are


u = 1
u = 1
u = 1
u = 1
u = 1
u = 1
u = 17
u = 33
u = 49
u = 65
u = 81
u = 97
u = 113
u = 129


Octave is correctly interpreting the code you have written so I'm closing this
report.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59616>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]