From e60ae2d81dfc6eb68e082552deeab368818c3575 Mon Sep 17 00:00:00 2001 From: Karl Wette Date: Wed, 28 Nov 2012 20:22:56 +0000 Subject: octave: Simplified module loading. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13941 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Doc/Manual/Octave.html | 44 +------------------------------------------- 1 file changed, 1 insertion(+), 43 deletions(-) (limited to 'Doc/Manual') diff --git a/Doc/Manual/Octave.html b/Doc/Manual/Octave.html index b8cf02a77..0340c2fd5 100644 --- a/Doc/Manual/Octave.html +++ b/Doc/Manual/Octave.html @@ -181,12 +181,7 @@ When Octave is asked to invoke example, it will try to find the ".m" or

-An Octave module can either load its symbols into the global namespace, so that they can be accessed directly without having to type the module name. -Alternatively, an Octave module can be accessed through a local variable, without being loaded globally. -

- -

-To load an Octave module globally, simply type its name: +To load an Octave module, simply type its name:

@@ -200,43 +195,6 @@ octave:5> cvar.Foo
 ans =  4
 
-

-To access an Octave module through a local variable, without loading it globally, simply assign the module name (e.g. "example") to the desired local variable: -

- -
-octave:1> example = example;
-octave:2> example.gcd(6,9)
-ans =  3
-octave:3> example.cvar.Foo
-ans =  3
-
- -

-The variable may have the same name as the module, or a shorter one: -

- -
-octave:1> ex = example;
-octave:2> ex.gcd(6,9)
-ans =  3
-octave:3> ex.cvar.Foo
-ans =  3
-
- -

-It is also possible to rename the global variables namespaces with an assignment, as in: -

- -
-octave:1> example;
-octave:2> cvar.gcd(10,4)
-ans =  2
-octave:3> some_vars = cvar;
-octave:4> some_vars.Foo
-ans =  3
-
-

Modules can also be loaded from within functions, even before being loaded in the base context. If the module is also used in the base context, however, it must first be loaded again: -- cgit v1.2.3