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

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

[Octave-bug-tracker] [bug #47676] Cannot apply computed assignment to a


From: Nicholas Jankowski
Subject: [Octave-bug-tracker] [bug #47676] Cannot apply computed assignment to a variable defined after the code was parsed (e.g., in a script)
Date: Fri, 9 Dec 2022 12:24:43 -0500 (EST)

Update of bug #47676 (project octave):

                  Status:         Patch Submitted => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #22:

regarding jwe's last question on this one, the outputs in Matlab 2022b:


>> fun
Error: File: fun.m Line: 3 Column: 3
Using identifier 'xyz' as both a variable and a command is not supported. For
more information,
see "How MATLAB Recognizes Command Syntax".

>> xyz = pi

xyz =

    3.1416

>> xyz -pi
Undefined function 'xyz' for input arguments of type 'char'.


in Octave 8.0.1 (hg id: 24bd675bceab), nearly identical behavior:

>> fun
error: parse error near line 3 of file C:\temp\fun.m

  xyz: invalid use of symbol as both variable and command

>>>   xyz -pi;
     ^
>> xyz = pi
xyz = 3.1416
>> xyz -pi
error: variable "xyz" used as function in command style expression
Check whitespace around potential binary operator.



That said, seeing this marked Patch submitted, in addition to the patch no
longer applying (some modified file no longer exists) it seems the topic of
this report may have been superseded by more recent octave versions and in
particular details covered in bug #62552.

seeing as how the original bug was concerned with code producing errors in
either scripts/CLI but not the other, and that now seems consistent, closing
as fixed.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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