|
From: | Michal Studniarek |
Subject: | Re: global variables |
Date: | Tue, 21 Jan 2014 17:39:35 +0100 |
On Tue, Jan 21, 2014 at 9:32 AM, louis scott <address@hidden> wrote:
explains it, no you cannot.
"A global variable may only be initialized once in aglobal
statement. "So while you cannot change, you can set inside a function.I think you are wrong.You can can change its value in a function, otherwise why is it called a variable??I admit, I never use them. I instead have a structure with state.
myvars.x = 22;myvars.createfile = true;myvars.madeitup_failure = makeitup(myvars, otherstuff);
function error_code = makeitup(statevars, otherstuff)
:
:On Tue, Jan 21, 2014 at 2:16 PM, Jabcok <address@hidden> wrote:
Hello,
I would like to know if there is any possible way to change the value of global variable from the inside of the function in Octave?
Best regards.
Sławomir Jabłoński
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
--
_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave
[Prev in Thread] | Current Thread | [Next in Thread] |