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

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

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


From: Billy
Subject: Re: [Octave-bug-tracker] [bug #59616] nested while cant detect parameter change
Date: Fri, 04 Dec 2020 01:12:07 -0000

Got it, thanks! 

On Thu, 3 Dec 2020 at 17:01, Rik <INVALID.NOREPLY@gnu.org> wrote:
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]