|
| From: | Michael Godfrey |
| Subject: | [Octave-bug-tracker] [bug #40392] function parameter not used in while loop correctly |
| Date: | Mon, 28 Oct 2013 00:09:05 +0000 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 |
Follow-up Comment #9, bug #40392 (project octave):
OK. here is a fact:
octave:23> prob_002 200
Variables in the current scope:
Attr Name Size Bytes Class
==== ==== ==== ===== =====
a argn 1x5 5 char
f x 1x3 3 char
Total is 8 elements using 8 bytes
y = 10
y = 44
ans = 44
octave:24> prob_002 (200)
Variables in the current scope:
Attr Name Size Bytes Class
==== ==== ==== ===== =====
a argn 1x3 3 char
f x 1x1 8 double
Total is 4 elements using 11 bytes
y = 10
y = 44
y = 188
ans = 188
octave:25>
=============================
In the first case x is a char, in the second it is a double.
so the while c<=x %
is not doing that you thought.
And, John is right. But this is confusing.
Michael
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40392>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
| [Prev in Thread] | Current Thread | [Next in Thread] |