bugGNU Octave - Bugs: bug #52363, global variable with operand += in...

 
 

bug #52363: global variable with operand += in a function

Submitter:  None
Submitted:  Wed 08 Nov 2017 12:14:25 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Mathieu Boutin Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 4.2.1
Operating System:  * Any Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 08 Nov 2017 11:08:43 PM UTC, comment #4: 

I am the originator of this bug report and I should have written "operator" instead of "operand" in the title.

Anonymous
Wed 08 Nov 2017 10:14:33 PM UTC, comment #3: 

Excellent, works on both stable and default branches now.  Closing report.

Rik <rik5>
Group administrator
Wed 08 Nov 2017 09:47:25 PM UTC, comment #2: 

I checked in the following changeset on stable then merged with default.

http://hg.savannah.gnu.org/hgweb/octave/rev/d2cfaaa57677

John W. Eaton <jwe>
Group administrator
Wed 08 Nov 2017 07:39:37 PM UTC, comment #1: 

Confirmed.  And the bug is still present on the development branch of Octave.  I'm also marking this bug as a Regression since this works in version 4.0.3, but fails in 4.2.0 and newer releases.

Rik <rik5>
Group administrator
Wed 08 Nov 2017 12:14:25 AM UTC, original submission:  

%%%%%%%%%%%%%%%file test.m (to run)

global s = 0;

increaseGlobal();

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%%%%%%%%%%%%%%%file increaseGlobal.m

function increaseGlobal()

  global s;
  s += 1;

endfunction

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

I receive: "error: s(61,_): but s has size 1x1",
because of the statement "s += 1".

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-11-08 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2017-11-08 jwe StatusConfirmed Ready For Test
    2017-11-08 rik5 Item GroupNone Regression
        StatusNone Confirmed
        Operating SystemMicrosoft Windows Any

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code