Skip to content

Commit

Permalink
Small change to docs for module import syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge authored May 24, 2024
1 parent 0c65f6f commit f6e4e5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/src/manual/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@ In contrast,
julia> import .NiceStuff
```

brings *only* the module name into scope. Users would need to use `NiceStuff.DOG`, `NiceStuff.Dog`, and `NiceStuff.nice` to access its contents. Usually, `import ModuleName` is used in contexts when the user wants to keep the namespace clean.
As we will see in the next section `import .NiceStuff` is equivalent to `using .NiceStuff: NiceStuff`.
brings *only* the module name into scope. Users would need to use `NiceStuff.DOG`, `NiceStuff.Dog`, and `NiceStuff.nice` to access its contents.
As we will see in the next section `import .NiceStuff` is equivalent to `using .NiceStuff: NiceStuff`. Usually, `import ModuleName` or `using ModuleName: ModuleName` is used in contexts when the user wants to keep the namespace clean.

You can combine multiple `using` and `import` statements of the same kind in a comma-separated expression, e.g.

Expand Down

0 comments on commit f6e4e5c

Please sign in to comment.