Suppose I have three octave scripts a.m, b.m, c.m, and two global variables x, y. Is it possible to define these global variables in such a way that they can be shared across scripts? For example in a separate include file?
More Generally, how do global variables in GNU octave work?
It seems you have to declare the variable global, and you also have to explicitly tell Octave that the variable you are referencing is in a different (global) scope.
in library.m
in main.m
foo() should return 5