[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47676] Error applying multiplication-assignme
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script |
Date: |
Thu, 14 Apr 2016 13:30:13 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:44.0) Gecko/20100101 Firefox/44.0 Iceweasel/44.0 |
Follow-up Comment #8, bug #47676 (project octave):
Carlo: I don't think it would be a good idea to try to do something that
works like an include statement without an actual #include (or similar)
directive that will make the intent clear. I don't have time at the moment to
provide an example, but if you want one I can probably come up with
something.
Note that this problem exists with Matlab too. The list of operators is just
different. For example, if you modify your script to have
Csb +fact
then I think it will fail because Csb is not recognized as a variable when
example_0 is parsed so the statement is converted to Csb ('+fact'). Then when
it is evaluated, it can't find a Csb function to call. But if you write
Csb + fact
it will do what you expect because with this spacing, the arguments look like
an expression.
Yes, this is ridiculous.
Yes, we can fix it for Octave so that the OP= operators are handled the same
as the OP operators. All I'm saying is that this will create an
incompatibility. But perhaps it is more useful to recognize the OP= operators
as operators (at least in some cases, depending on whitespace, same as other
operators) than to ignore them for the sake of compatibility.
I always thought that parsing commands this way was stupid, but I didn't get
to vote on what Matlab was going to do.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47676>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script, Carlo de Falco, 2016/04/12
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script, Carlo de Falco, 2016/04/12
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script, John W. Eaton, 2016/04/12
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script, Carlo de Falco, 2016/04/13
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script, John W. Eaton, 2016/04/13
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script, Lachlan Andrew, 2016/04/13
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script, Lachlan Andrew, 2016/04/13
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script, Carlo de Falco, 2016/04/14
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script,
John W. Eaton <=
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script, John W. Eaton, 2016/04/14
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script, Carlo de Falco, 2016/04/14
- [Octave-bug-tracker] [bug #47676] Error applying multiplication-assignment operator to variable defined in script, Carlo de Falco, 2016/04/14