(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 8825, 328]*) (*NotebookOutlinePosition[ 9909, 363]*) (* CellTagsIndexPosition[ 9865, 359]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell[TextData["23. Contexts and Packages: Homework"], "Title", Evaluatable->False, AspectRatioFixed->True], Cell["Last revision: April 15, 1998", "SmallText", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell[TextData["Author: YourNameGoesHere"], "Subtitle", CellFrame->True, Evaluatable->False, AspectRatioFixed->True, Background->GrayLevel[0.899992]], Cell[TextData[ "Be sure that you complete the problems in this homework assignment in order, \ and that, upon returning to the notebook, you execute your previously \ completed cells in order. Otherwise, the context manipulation may not work \ properly."], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{ Cell[TextData["Initializing Names in a Context"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Declare \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" and \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["y", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" in a new context \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["Dav`", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\", initializing \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" to be 1 and \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["y", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" to be 2. Check that your code works by asking \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["?Dav`x", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" and \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["?Dav`y", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\".", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell[TextData["Another Context"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Define \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" and \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["y", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" in a new context \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["Cats`", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\", initializing \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" to be 3 and \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["y", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" to be 4. Check that your code works by asking \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["?Cats`x", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" and \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["?Cats`y", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox[ "\". Check that you haven't damaged the old variables by asking \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["?Dav`x", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" and \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["?Dav`y", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\".", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell[TextData["Changing Contexts"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Set the default context (using an assignment statement with \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["$Context", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\") to \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["Cats`", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\", and find the values of \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" and \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["y", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\". Also request the values of \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["Dav`x", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" and \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["Dav`y", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\". Then set the default context back to \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["Global`", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\".", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True] }, Closed]], Cell[CellGroupData[{ Cell[TextData["Changing Context Search Paths"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox[ "Set the context search path (using an assignment statement with \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["$ContextPath", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\") to \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["{\"Dav`\", \"Cats`\", \"Global`\", \"System`\"}", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\", and find the values of \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["x", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\" and \"", Evaluatable->False, AspectRatioFixed->True], StyleBox["y", Evaluatable->False, AspectRatioFixed->True, FontFamily->"Courier"], StyleBox["\". ", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True] }, Closed]] }, Open ]] }, Open ]] }, FrontEndVersion->"Macintosh 3.0", ScreenRectangle->{{0, 832}, {0, 604}}, WindowToolbars->{}, WindowSize->{564, 564}, WindowMargins->{{61, Automatic}, {Automatic, 8}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, MacintoshSystemPageSetup->"\<\ 00<0004/0B`000003809T?o>old" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1731, 51, 111, 2, 136, "Title", Evaluatable->False], Cell[1845, 55, 99, 2, 26, "SmallText", Evaluatable->False], Cell[CellGroupData[{ Cell[1969, 61, 156, 4, 78, "Subtitle", Evaluatable->False], Cell[2128, 67, 313, 6, 62, "Text", Evaluatable->False], Cell[CellGroupData[{ Cell[2466, 77, 108, 2, 50, "Section", Evaluatable->False], Cell[2577, 81, 1444, 55, 48, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[4058, 141, 92, 2, 30, "Section", Evaluatable->False], Cell[4153, 145, 1862, 70, 65, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[6052, 220, 94, 2, 30, "Section", Evaluatable->False], Cell[6149, 224, 1514, 55, 65, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[7700, 284, 106, 2, 30, "Section", Evaluatable->False], Cell[7809, 288, 976, 35, 48, "Text", Evaluatable->False] }, Closed]] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)