|
|
||
|
|
| BeginPackage["context`"] makes context` and System` the only active contexts. |
| BeginPackage["context`", {"need1`", "need2`", ...}] calls Needs on the needi. |
Commands to define a simple package:
The context for symbol creation has been changed to square`:
The context path for symbol lookup includes square`:
Here are the commands defining the function in the package:
Restore the context, but leave square` on the context path for symbol lookup:
Since EndPackage leaves square`square on the context path, the function defined is visible: Get the square of 12:
|
| © 2008 Wolfram Research, Inc. |