|
From: | anonymous |
Subject: | [Octave-bug-tracker] [bug #52363] global variable with operand += in a function |
Date: | Tue, 7 Nov 2017 19:14:26 -0500 (EST) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 |
URL: <http://savannah.gnu.org/bugs/?52363> Summary: global variable with operand += in a function Project: GNU Octave 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: None Status: None Assigned to: None Originator Name: Mathieu Boutin Originator Email: address@hidden Open/Closed: Open Discussion Lock: Any Release: 4.2.1 Operating System: Microsoft Windows _______________________________________________________ Details: %%%%%%%%%%%%%%%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". _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?52363> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |