@@ -91,23 +91,24 @@ To load a module, two main keywords can be used: ``using`` and ``import``. To un
91
91
92
92
In this module we export the ``x `` and ``y `` functions (with the keyword ``export ``), and also have the non-exported function ``p ``. There are several different ways to load the Module and its inner functions into the current workspace:
93
93
94
- +------------------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------------------------+
95
- | Import Command | What is brought into scope | Available for method extension |
96
- +====================================+==============================================================================================+========================================================================+
97
- | ``using MyModule `` | All ``export `` ed names (``x `` and ``y ``), ``MyModule.x ``, ``MyModule.y `` and ``MyModule.p `` | ``MyModule.x ``, ``MyModule.y `` and ``MyModule.p `` |
98
- +------------------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------------------------+
99
- | ``using MyModule.x, MyModule.p `` | ``x `` and ``p `` | |
100
- +------------------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------------------------+
101
- | ``using MyModule: x, p `` | ``x `` and ``p `` | |
102
- +------------------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------------------------+
103
- | ``import MyModule `` | ``MyModule.x ``, ``MyModule.y `` and ``MyModule.p `` | ``MyModule.x ``, ``MyModule.y `` and ``MyModule.p `` |
104
- +------------------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------------------------+
105
- | ``import MyModule.x, MyModule.p `` | ``x `` and ``p `` | ``x `` and ``p `` |
106
- +------------------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------------------------+
107
- | ``import MyModule: x, p `` | ``x `` and ``p `` | ``x `` and ``p `` |
108
- +------------------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------------------------+
109
- | ``importall MyModule `` | All ``export `` ed names (``x `` and ``y ``) | ``x `` and ``y `` |
110
- +------------------------------------+----------------------------------------------------------------------------------------------+------------------------------------------------------------------------+
94
+ +------------------------------------+-------------------------------------+---------------------------------------------------+
95
+ | Import Command | What is brought into scope | Available for method extension |
96
+ +====================================+=====================================+===================================================+
97
+ | ``using MyModule `` | ``x ``, ``y ``, ``MyModule.* `` | ``MyModule.* `` |
98
+ +------------------------------------+-------------------------------------+---------------------------------------------------+
99
+ | ``using MyModule.x, MyModule.p `` | ``x ``, ``p ``, ``MyModule.* `` | ``MyModule.* `` |
100
+ +------------------------------------+-------------------------------------+---------------------------------------------------+
101
+ | ``using MyModule: x, p `` | ``x ``, ``p ``, ``MyModule.* `` | ``MyModule.* `` |
102
+ +------------------------------------+-------------------------------------+---------------------------------------------------+
103
+ | ``import MyModule `` | ``MyModule.* `` | ``MyModule.* `` |
104
+ +------------------------------------+-------------------------------------+---------------------------------------------------+
105
+ | ``import MyModule.x, MyModule.p `` | ``x ``, ``p ``, ``MyModule.* `` | ``x ``, ``p ``, ``MyModule.* `` |
106
+ +------------------------------------+-------------------------------------+---------------------------------------------------+
107
+ | ``import MyModule: x, p `` | ``x ``, ``p ``, ``MyModule.* `` | ``x ``, ``p ``, ``MyModule.* `` |
108
+ +------------------------------------+-------------------------------------+---------------------------------------------------+
109
+ | ``importall MyModule `` | ``x ``, ``y ``, ``MyModule.* `` | ``x ``, ``y ``, ``MyModule.* `` |
110
+ +------------------------------------+-------------------------------------+---------------------------------------------------+
111
+ Note: In all cases, ``MyModule.*`` (i.e. ``MyModule.x``, ``MyModule.y`` and ``MyModule.p``) are loaded into current workspace and it is possible to add methods to them.
111
112
112
113
113
114
Modules and files
0 commit comments