Skip to content

Commit b828bbc

Browse files
kshyattViralBShah
andauthored
Xrefs and wording updates for modules manual (#25192)
* Cross references and small wording updates in modules manual. * Update modules.md Co-authored-by: Viral B. Shah <ViralBShah@users.noreply.github.com>
1 parent d85d8a9 commit b828bbc

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

doc/src/manual/modules.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ p() = "p"
7474
end
7575
```
7676

77-
In this module we export the `x` and `y` functions (with the keyword `export`), and also have
77+
In this module we export the `x` and `y` functions (with the keyword [`export`](@ref)), and also have
7878
the non-exported function `p`. There are several different ways to load the Module and its inner
7979
functions into the current workspace:
8080

@@ -122,6 +122,16 @@ There are three important standard modules:
122122
* [`Base`](@ref) contains basic functionality that is useful in almost all cases.
123123
* [`Main`](@ref) is the top-level module and the current module, when Julia is started.
124124

125+
126+
!!! note "Standard library modules"
127+
By default Julia ships with some standard library modules. These behave like regular
128+
Julia packages except that you don't need to install them explicitly. For example,
129+
if you wanted to perform some unit testing, you could load the `Test` standard library
130+
as follows:
131+
```julia
132+
using Test
133+
```
134+
125135
### Default top-level definitions and bare modules
126136

127137
In addition to `using Base`, modules also automatically contain
@@ -208,7 +218,7 @@ recompiled upon `using` or `import` whenever any of its dependencies change; dep
208218
imports, the Julia build, files it includes, or explicit dependencies declared by [`include_dependency(path)`](@ref)
209219
in the module file(s).
210220

211-
For file dependencies, a change is determined by examining whether the modification time (mtime)
221+
For file dependencies, a change is determined by examining whether the modification time (`mtime`)
212222
of each file loaded by `include` or added explicitly by `include_dependency` is unchanged, or equal
213223
to the modification time truncated to the nearest second (to accommodate systems that can't copy
214224
mtime with sub-second accuracy). It also takes into account whether the path to the file chosen
@@ -273,7 +283,7 @@ in `__init__`: their definitions can be precompiled and loaded from the cached m
273283
includes complicated heap-allocated objects like arrays. However, any routine that returns a raw
274284
pointer value must be called at runtime for precompilation to work ([`Ptr`](@ref) objects will turn into
275285
null pointers unless they are hidden inside an [`isbits`](@ref) object). This includes the return values
276-
of the Julia functions `cfunction` and [`pointer`](@ref).
286+
of the Julia functions [`@cfunction`](@ref) and [`pointer`](@ref).
277287

278288
Dictionary and set types, or in general anything that depends on the output of a `hash(key)` method,
279289
are a trickier case. In the common case where the keys are numbers, strings, symbols, ranges,

0 commit comments

Comments
 (0)