|
From: | Rik |
Subject: | [Octave-bug-tracker] [bug #54094] The command window freezes if you you use single equal (=) in while function instead of double equal(==) |
Date: | Mon, 11 Jun 2018 12:34:07 -0400 (EDT) |
User-agent: | Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0 |
Update of bug #54094 (project octave): Status: None => Invalid Open/Closed: Open => Closed _______________________________________________________ Follow-up Comment #2: I agree with comment #1, it appears that you have merely created an infinite loop. Try this code on the command line. octave:1> x = 1; octave:2> while (x = 0) > x++; > endwhile warning: suggest parenthesis around assignment used as truth value octave:3> The first time through the loop x is assigned the value of 0 and "while (0)" is false so the loop stops immediately. On the other hand, if the assignement (=) creates a true value then the loop is infinite. I used a Ctrl+C to break the loop. octave:3> x = 1; octave:4> while (x = 1) > x++; > endwhile warning: suggest parenthesis around assignment used as truth value ^C octave:4> _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?54094> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |