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


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

Submitted by:  None
Submitted on:  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

Add a New Comment (Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


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.

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

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

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

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


John W. Eaton <jwe>
Project 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>
Project Administrator
Wed 08 Nov 2017 12:14:25 AM UTC, original submission:  

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

global s = 0;



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

function increaseGlobal()

  global s;
  s += 1;



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



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

Attach Files:

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)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project 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.7