(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing 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[ 159384, 5108]*) (*NotebookOutlinePosition[ 222868, 7406]*) (* CellTagsIndexPosition[ 220818, 7354]*) (*WindowFrame->Normal*) Notebook[{ Cell[TextData[StyleBox["Dbg \[Dash] an easy to use debugger", FontColor->RGBColor[0, 0, 1]]], "Chapter"], Cell[BoxData[{ RowBox[{"David", " ", "Bailey"}], "\n", RowBox[{"Salford", " ", "Software"}], "\n", RowBox[{ RowBox[{"db", "@", "salford"}], "-", RowBox[{"software", ".", "com"}]}]}], "Input", TextAlignment->Left, TextJustification->0, FontSize->12, FontWeight->"Plain", FontSlant->"Italic"], Cell[CellGroupData[{ Cell["Introduction", "SubsubsectionIcon", PageWidth->WindowWidth], Cell[TextData[{ "The built-in debug functions such as ", StyleBox["Trace", "FunctionName"], " and related functions suffer from several practical drawbacks:\n\ \[FilledSmallCircle] If used without restrictions they generate enormous \ quantities of output. Large parts of the code can get output repeatedly in \ the form of ", StyleBox["CompoundExpression", "FunctionName"], " constructs etc., and the output shows the evaluation of many objects \ (such as ", StyleBox["Plus", "FunctionName"], ", 42, \[Pi], etc.) which evaluate to themselves.\n\[FilledSmallCircle] ", StyleBox["Trace", "FunctionName"], " generates its output in the form of nested lists. This can be very hard \ to interpret, particularly if the program itself manipulates lists. " }], "Text", PageWidth->WindowWidth], Cell[TextData[{ "\[FilledSmallCircle] ", StyleBox["Trace", "FunctionName"], " generates no output if the program fails to terminate for one reason or \ another.\n\[FilledSmallCircle] ", StyleBox["TracePrint", "FunctionName"], " at least works for non-terminating programs, but the output is usually \ still enormous.\n\[FilledSmallCircle] Facilities for interactive debugging \ are very sparse." }], "Text", PageWidth->WindowWidth], Cell[TextData[{ "\[FilledSmallCircle] ", StyleBox["TraceScan", "FunctionName"], " is really a tool for building a high level debugger. ", StyleBox["Dbg", "FunctionName"], " is based on ", StyleBox["TraceScan", "FunctionName"], ".\nThe essential problem with ", StyleBox["TracePrint", "FunctionName"], " and related functions is that when a user restricts his output he is \ likely to remove too much information. Also, the standard functions give very \ little help in interpreting the output.\n", StyleBox["Dbg", "FunctionName"], " is designed particularly (but certainly not exclusively) for less \ experienced ", StyleBox["Mathematica", FontSlant->"Italic"], " programmers. It uses the facilities of the frontend to help the user \ navigate its output. The philosophy behind ", StyleBox["Dbg", "FunctionName"], " is that a debugger must be easy to use so as not to distract the user \ from the details of the code he or she is attempting to correct. \nNote: The \ use of ", StyleBox["Dbg", "FunctionName"], " inevitably slows the execution of the program under test considerably. \ Even when ", StyleBox["Dbg", "FunctionName"], " is not reporting information it has to execute a number of ", StyleBox["Mathematica", FontSlant->"Italic"], " steps for every step of the program under test. Users should be aware of \ this when deciding how much time to give a looping program etc." }], "Text", PageWidth->WindowWidth] }, Closed]], Cell[CellGroupData[{ Cell["Simple use", "SubsubsectionIcon", PageWidth->WindowWidth, ShowGroupOpenCloseIcon->True], Cell["\<\ This section consists of a brief tour of some of the simplest facilities of \ Dbg. The subsequent sections describe these facilities in detail.\ \>", "Text"], Cell[TextData[{ "\[FilledSmallCircle] Consider the following rather naive program, which \ forms a dot product of two lists. Obviously this task would be better \ performed by ", StyleBox["Dot", "FunctionName"], " (and a loop is unnecessary here), but we simply want something elementary \ to debug:" }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"dot\[Breve]product", "[", RowBox[{"x_List", ",", "y_List"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"k", "=", RowBox[{"Length", "[", "x", "]"}]}], ",", RowBox[{"ss", "=", "0"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"k", ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"ss", "=", RowBox[{"ss", "+", RowBox[{ RowBox[{"x", "[", RowBox[{"[", "k", "]"}], "]"}], RowBox[{"y", "[", RowBox[{"[", "k", "]"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"k", "--"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "ss"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellLabel->"In[9]:="], Cell[TextData[{ "To explore this code using ", StyleBox["Dbg", "FunctionName"], " we first load the package thus:" }], "Text"], Cell[BoxData[ RowBox[{"<<", "\"\\""}]], "Input"], Cell[TextData[{ "Loading the package will also display a small palette known as the \ debugger palette. This contains two sets of buttons, the bottom set of \ buttons are reserved for use when the program is suspended at a ", ButtonBox["breakpoint", ButtonData:>"Breakpoint", ButtonStyle->"Hyperlink"], "." }], "Text"], Cell["Now we can debug the program thus:", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"dot\[Breve]product", "[", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}]}], "]"}], "//", RowBox[{"Dbg", "[", "]"}]}]], "Input", CellLabel->"In[8]:="], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_44_31_"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["1", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"dot\[Breve]product", "[", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}]}], "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_44_31_3"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_44_31_"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["2", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["Module", (Short[ #, 4]&)], TagBox["\<\"[\"\>", (Short[ #, 4]&)], TagBox[ RowBox[{"{", RowBox[{ RowBox[{"k$", "=", RowBox[{"Length", "[", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "]"}]}], ",", RowBox[{"ss$", "=", "0"}]}], "}"}], (Short[ #, 4]&)], TagBox["\<\",...\"\>", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_44_31_3"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_44_31_3"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["3", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"Length", "[", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_44_31_4"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_44_31_3"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["4", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["2", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_44_31_4"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_44_31_3"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["5", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"k$59", "=", "2"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_44_31_5"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_44_31_3"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["6", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["2", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_44_31_5"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_44_31_3"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["7", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"ss$59", "=", "0"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_44_31_6"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_44_31_3"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["8", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["0", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_44_31_6"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_44_31_6"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["9", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"Print", "[", StyleBox["\"\\"", ShowSpecialCharacters->False, ShowStringCharacters->True, NumberMarks->True], "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_44_31_7"], Cell[BoxData["\<\"Starting\"\>"], "Print", CellLabel->"From In[8]:="], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_44_31_6"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["10", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["Null", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_44_31_7"], Cell[BoxData[ StyleBox[ TagBox["\<\"Dbg print limit exceeded - execution continuing\"\>", (Short[ #, 4]&)], FontColor->RGBColor[1, 0, 0]]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ StyleBox[ RowBox[{ TagBox["84", (Short[ #, 4]&)], TagBox["\<\" steps in all\"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData["23"], "Output", CellLabel->"Out[8]="] }, Open ]], Cell[TextData[{ "\[FilledSmallCircle] Notice that all the debugger output appears on a pink \ background, which distinguishes it from any actual ", StyleBox["Print", "FunctionName"], " calls that you may have in your code. Every line is labeled with a step \ number. As you will see shortly, step numbers can be very useful to control \ the debugger on subsequent runs. By default the debugger only prints ten \ steps before it simply lets your program run on to completion. As you will \ see, you can decide how many debug steps to print and at which step number to \ start. The idea is that you do not become overwhelmed with output from ", StyleBox["Dbg", "FunctionName"], " before you know what you are doing.\n\[FilledSmallCircle] As the program \ runs under ", StyleBox["Dbg", "FunctionName"], " the step count is maintained in the status bar of the debugger palette. \n\ \[FilledSmallCircle] Before the step numbers you will see two buttons. Try \ pressing the left button on the fourth step above (i.e. the button containing \ a '?' symbol). Look carefully at the cell brackets. Two cells have been \ selected corresponding to steps 3 and 4 of the debug process. This shows you \ that the expression Length[{2,3}] evaluated to 2. In general pressing the '?' \ button will select several steps which will not necessarily be adjacent. \ These cells represent the various steps in the evaluation of a single \ sub-object. This is known as an evaluation chain. Be aware that if cell \ brackets are suppressed in your notebook, pressing either of these buttons \ will enable them.\n\[FilledSmallCircle] Now return to step 4 and press the '\ \[UpArrow]' button. This will select those steps which form the evaluation \ chain which spawned the calculation of Length[{2,3}]. In this case steps 1 \ and 2 are selected. Looking up from step 4 we see that step 2 is the nearest \ highlighted step, so it is the step that called for the ", StyleBox["Length", "FunctionName"], " calculation. As you can see, step 2 is a ", StyleBox["Module", "FunctionName"], " construct and the ", StyleBox["Length", "FunctionName"], " calculation is indeed used to initialise one of the variables.\n\ \[FilledSmallCircle] Observe the syntax of ", StyleBox["Dbg", "FunctionName"], " carefully. ", StyleBox["Dbg", "FunctionName"], " is a function which returns a function. It is that function which is \ applied to the expression to be debugged using '//'. Why is ", StyleBox["Dbg", "FunctionName"], " defined in such a seemingly clumsy way? The reason is that it enables the \ debugger information to be appended to the end of an expression, rather than \ surrounding it. To see this, consider the built-in ", StyleBox["TracePrint", "FunctionName"], " function. This can be used to obtain a rather less helpful debug \ printout:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Sin", "[", "0.5", "]"}], "//", "TracePrint"}]], "Input", CellLabel->"In[4]:="], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[4]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox[ RowBox[{"Sin", "[", "0.5`", "]"}], HoldForm]}], SequenceForm[ Indent[ 1], HoldForm[ Sin[ .5]]], Editable->False]], "Print", CellLabel->"From In[4]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[4]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox["Sin", HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ Sin]], Editable->False]], "Print", CellLabel->"From In[4]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[4]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox["0.5`", HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ .5]], Editable->False]], "Print", CellLabel->"From In[4]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[4]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox["0.479425538604203`", HoldForm]}], SequenceForm[ Indent[ 1], HoldForm[ .47942553860420301]], Editable->False]], "Print", CellLabel->"From In[4]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["0.479425538604203`"], "Output", CellLabel->"Out[4]=", GeneratedCell->False, CellAutoOverwrite->False] }, Open ]], Cell[TextData[{ "However, as soon as you start using additional arguments to ", StyleBox["TracePrint", "FunctionName"], " you are more or less forced to use a less neat syntax:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"TracePrint", "[", RowBox[{ RowBox[{"Sin", "[", "0.5", "]"}], ",", "_Sin"}], "]"}]], "Input", CellLabel->"In[5]:="], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[5]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox[ RowBox[{"Sin", "[", "0.5`", "]"}], HoldForm]}], SequenceForm[ Indent[ 1], HoldForm[ Sin[ .5]]], Editable->False]], "Print", CellLabel->"From In[5]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["0.479425538604203`"], "Output", CellLabel->"Out[5]=", GeneratedCell->False, CellAutoOverwrite->False] }, Open ]], Cell[TextData[{ "It is now much less clear what is the expression being debugged and what \ is extra information supplied to ", StyleBox["TracePrint", "FunctionName"], "." }], "Text"], Cell[TextData[{ "\[FilledSmallCircle] As an illustration we will apply two arguments (which \ will be described fully later) to cause ", StyleBox["Dbg", "FunctionName"], " to print out steps 11-15 (rather than 1-10, which is the default):" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"dot\[Breve]product", "[", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}]}], "]"}], "//", RowBox[{"Dbg", "[", RowBox[{ RowBox[{"MaxSteps", "\[Rule]", "5"}], ",", RowBox[{"StartStep", "\[Rule]", "11"}]}], "]"}]}]], "Input", CellLabel->"In[5]:="], Cell[BoxData["\<\"Starting\"\>"], "Print", CellLabel->"From In[5]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg$144"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["11", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["While", (Short[ #, 4]&)], TagBox["\<\"[\"\>", (Short[ #, 4]&)], TagBox[ RowBox[{"k$114", ">", "0"}], (Short[ #, 4]&)], TagBox["\<\",...\"\>", (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$179"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg$179"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["12", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"k$114", ">", "0"}], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$188"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg$188"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["13", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["k$114", (Short[ #, 4]&)], StyleBox[ TagBox["\<\" \[LongRightArrow] \"\>", (Short[ #, 4]&)], FontColor->RGBColor[0, 0, 1]], TagBox["2", (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$197"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg$188"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["14", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["2", (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$197"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg$179"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["15", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"2", ">", "0"}], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$188"], Cell[BoxData[ StyleBox[ TagBox["\<\"Dbg print limit exceeded - execution continuing\"\>", (Short[ #, 4]&)], FontColor->RGBColor[1, 0, 0]]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ StyleBox[ RowBox[{ TagBox["84", (Short[ #, 4]&)], TagBox["\<\" steps in all\"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData["23"], "Output", CellLabel->"Out[5]=", GeneratedCell->False, CellAutoOverwrite->False] }, Open ]], Cell[TextData[{ "\[FilledSmallCircle] Now we will debug the program interactively, stepping \ the process to places of interest. Using the option Step->True means that the \ program is stopped at each step and is advanved by pressing the \"Step\" \ button in the debugger palette. Whenever the program is stopped it is \ possible to examine program variables (or other expressions) by evaluating \ expressions in the usual ", StyleBox["Mathematica", FontSlant->"Italic"], " way before advancing the program to another point. In this example we \ print the current value of the local variable k by noting its new name \ (assigned by ", StyleBox["Module", "FunctionName"], ") and using that explicitly." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"dot\[Breve]product", "[", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}]}], "]"}], "//", RowBox[{"Dbg", "[", RowBox[{"Step", "\[Rule]", "True"}], "]"}]}]], "Input", CellLabel->"In[12]:="], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["1", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"dot\[Breve]product", "[", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}]}], "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_40"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["2", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["Module", (Short[ #, 4]&)], TagBox["\<\"[\"\>", (Short[ #, 4]&)], TagBox[ RowBox[{"{", RowBox[{ RowBox[{"k$", "=", RowBox[{"Length", "[", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "]"}]}], ",", RowBox[{"ss$", "=", "0"}]}], "}"}], (Short[ #, 4]&)], TagBox["\<\",...\"\>", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_40"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_40"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["3", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"Length", "[", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_41"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_40"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["4", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["2", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_41"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_40"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["5", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"k$244", "=", "2"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_42"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_40"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["6", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["2", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_42"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_40"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["7", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"ss$244", "=", "0"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_43"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_40"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["8", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["0", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_43"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_43"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["9", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"Print", "[", StyleBox["\"\\"", ShowSpecialCharacters->False, ShowStringCharacters->True, NumberMarks->True], "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_44"], Cell[BoxData["\<\"Starting\"\>"], "Print", CellLabel->"From In[11]:="], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_43"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["10", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["Null", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_44"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_43"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["11", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["While", (Short[ #, 4]&)], TagBox["\<\"[\"\>", (Short[ #, 4]&)], TagBox[ RowBox[{"k$244", ">", "0"}], (Short[ #, 4]&)], TagBox["\<\",...\"\>", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_45"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_12_55_38_45"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["12", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"k$244", ">", "0"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_12_55_38_46"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData["k$244"], "Input", CellLabel->"(Dialog) In[11]:="], Cell[BoxData["2"], "Output", CellLabel->"(Dialog) Out[11]="] }, Open ]], Cell[TextData[{ "\[FilledSmallCircle] Dbg is also very effective at exploring code written \ in a more functional style. For example, the fact that ", StyleBox["Mod", "FunctionName"], " can take a list as its first argument (i.e. ", StyleBox["Mod", "FunctionName"], " has attribute ", StyleBox["Listable", "FunctionName"], ") can be made explicitly obvious thus:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"{", RowBox[{"10", ",", "11", ",", "12"}], "}"}], ",", "7"}], "]"}], "//", RowBox[{"Dbg", "[", "]"}]}]], "Input", CellLabel->"In[6]:="], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_16_16_41_"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["1", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"Mod", "[", RowBox[{ RowBox[{"{", RowBox[{"10", ",", "11", ",", "12"}], "}"}], ",", "7"}], "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_16_16_41_18"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_16_16_41_18"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["2", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"Mod", "[", RowBox[{"10", ",", "7"}], "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_16_16_41_19"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_16_16_41_18"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["3", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["3", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_16_16_41_19"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_16_16_41_18"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["4", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"Mod", "[", RowBox[{"11", ",", "7"}], "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_16_16_41_20"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_16_16_41_18"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["5", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["4", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_16_16_41_20"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_16_16_41_18"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["6", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"Mod", "[", RowBox[{"12", ",", "7"}], "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_16_16_41_21"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_16_16_41_18"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["7", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["5", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_16_16_41_21"], Cell[BoxData[ StyleBox[ RowBox[{ TagBox["7", (Short[ #, 4]&)], TagBox["\<\" steps in all\"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ RowBox[{"{", RowBox[{"3", ",", "4", ",", "5"}], "}"}]], "Output", CellLabel->"Out[6]="] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Controlling Dbg with options", "SubsubsectionIcon"], Cell[TextData[{ "\[FilledSmallCircle] ", StyleBox["Dbg", "FunctionName"], " is controlled by options. These may be set on a per use basis, as in the \ above example, or until further notice using ", StyleBox["SetOptions", "FunctionName"], ". For example, ", StyleBox["Dbg", "FunctionName"], " is set up to print only ten steps by default. This is to prevent a \ beginner becoming overwhelmed by output and failing to learn how to control \ the debugger. To reset this limit to 100 you could use:" }], "Text"], Cell[BoxData[ RowBox[{"SetOptions", "[", RowBox[{"Dbg", ",", RowBox[{"MaxSteps", "\[Rule]", "100"}]}], "]"}]], "Input"], Cell[TextData[{ "Options set explicitly in ", StyleBox["Dbg", "FunctionName"], " override options set using ", StyleBox["SetOptions", "FunctionName"], " in the normal ", StyleBox["Mathematica", FontSlant->"Italic"], " way.\n", StyleBox["Dbg", "FunctionName"], " understands the following options:" }], "Text"], Cell[BoxData[ TagBox[GridBox[{ { StyleBox["MaxSteps", "FunctionName"], "10", RowBox[{ "Maximum", " ", "number", " ", "of", " ", "intermediate", " ", "steps", " ", "to", " ", "print"}]}, { StyleBox["ShowHeads", "FunctionName"], "All", RowBox[{ RowBox[{"Head", " ", "or", " ", "list", " ", "of", " ", RowBox[{"heads", ".", " ", "Print"}], " ", "only", " ", "expressions"}], " ", "\[IndentingNewLine]", RowBox[{ "that", " ", "match", " ", "one", " ", "of", " ", "these"}]}]}, { StyleBox["ExcludeHeads", "FunctionName"], "None", RowBox[{ "List", " ", "of", " ", "heads", " ", "of", " ", "expressions", " ", "not", " ", "to", " ", "print"}]}, { StyleBox["ContinueExecution", "FunctionName"], "True", RowBox[{ RowBox[{ "Whether", " ", "to", " ", "continue", " ", "execution", " ", "after", " ", "print"}], " ", "\[IndentingNewLine]", RowBox[{"limit", " ", "exceeded", " "}]}]}, { StyleBox["StartStep", "FunctionName"], "1", RowBox[{ "Number", " ", "of", " ", "step", " ", "at", " ", "which", " ", "printing", " ", "begins", " "}]}, { StyleBox["TriggerOn", "FunctionName"], "None", RowBox[{ "Start", " ", "printing", " ", "after", " ", "this", " ", "pattern", " ", "is", " ", "reached"}]}, { StyleBox["TriggerOff", "FunctionName"], "None", RowBox[{ RowBox[{ "Stop", " ", "printing", " ", "after", " ", "this", " ", "pattern", " ", "has"}], " ", "\[IndentingNewLine]", RowBox[{"been", " ", "reached"}]}]}, { StyleBox["ShowLevels", "FunctionName"], "False", RowBox[{ RowBox[{ "Show", " ", "the", " ", "level", " ", "on", " ", "the", " ", "stack", " ", "of", " ", "each", " ", "expression"}], " ", "\[IndentingNewLine]", RowBox[{"(", RowBox[{"advanced", " ", "feature"}], ")"}]}]}, { StyleBox["SuppressPackages", "FunctionName"], "True", RowBox[{ "Do", " ", "not", " ", "print", " ", "steps", " ", "inside", " ", "packages", " "}]}, { StyleBox["HiddenFunctions", "FunctionName"], "None", RowBox[{ RowBox[{ "List", " ", "of", " ", "functions", " ", "whose", " ", "inner", " ", "workings", " ", "are"}], " ", "\[IndentingNewLine]", RowBox[{"not", " ", "of", " ", "interest"}]}]}, { StyleBox["AbortStep", "FunctionName"], "\[Infinity]", RowBox[{ "Abort", " ", "with", " ", "traceback", " ", "after", " ", "this", " ", "step", " ", "number"}]}, { StyleBox["Step", "FunctionName"], "False", RowBox[{ RowBox[{ "Suspend", " ", "the", " ", "program", " ", "at", " ", "the", " ", "first", " ", "step", " ", "so", " ", "as", " ", "to"}], "\[IndentingNewLine]", RowBox[{ "use", " ", "the", " ", "breakpoint", " ", "facilities"}]}]}, { StyleBox["BreakAt", "FunctionName"], "Null", RowBox[{ RowBox[{ "Pattern", " ", "to", " ", "use", " ", "as", " ", "a", " ", RowBox[{"breakpoint", ".", " ", "This"}], " ", "option", " ", "is"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ "usually", " ", "supplied", " ", "using", " ", "the"}], " ", "\[RuleDelayed]", " ", RowBox[{"operator", " ", "to"}]}], "\[IndentingNewLine]", RowBox[{ "prevent", " ", "the", " ", "evaluation", " ", "of", " ", "the", " ", "pattern", " ", "itself"}]}]}, { StyleBox["BreakFail", "FunctionName"], "False", RowBox[{ RowBox[{ "Whether", " ", "to", " ", "use", " ", "the", " ", "breakpoint", " ", "mechanism", " ", "if", " ", "the"}], " ", "\[IndentingNewLine]", RowBox[{ "program", " ", "is", " ", "aborted", " ", "by", " ", "button", " ", "or", " ", "generates", " ", "an"}], " ", "\[IndentingNewLine]", RowBox[{"error", " ", RowBox[{"message", "."}]}]}]}, { StyleBox["AbortStepCount", "FunctionName"], "10", RowBox[{ RowBox[{ "Number", " ", "of", " ", "steps", " ", "to", " ", "print", " ", "after", " ", "the", " ", "Abort"}], " ", "\[IndentingNewLine]", RowBox[{ "button", " ", "is", " ", "pressed", " ", "and", " ", "before", " ", "the", " ", "process"}], " ", "\[IndentingNewLine]", RowBox[{ "goes", " ", "into", " ", "traceback", " ", "and", " ", "aborts"}]}]}, { StyleBox["FilterHeads", "FunctionName"], "Null", RowBox[{ RowBox[{"User", "-", RowBox[{ "supplied", " ", "predicate", " ", "which", " ", "takes", " ", "a", " ", "head", " ", "as"}]}], "\[IndentingNewLine]", RowBox[{ "argument", " ", "and", " ", "returns", " ", "True", " ", "if", " ", "Dbg", " ", "should", " ", "display"}], " ", "\[IndentingNewLine]", RowBox[{"expressions", " ", "with", " ", "that", " ", RowBox[{"head", "."}]}]}]} }, RowSpacings->1, ColumnSpacings->3, RowAlignments->Baseline, ColumnAlignments->{Left}, GridFrame->2, RowLines->True, ColumnLines->True], (TableForm[ #]&)]], "Text"], Cell[TextData[{ "\[FilledSmallCircle] Setting ", StyleBox["ShowHeads", "FunctionName"], " to a head or list of heads usually drastically reduces the output of ", StyleBox["Dbg", "FunctionName"], " \[Dash] only terms with the given heads will print. Sometimes it is more \ effective to trim the output using ", StyleBox["ExludeHeads", "FunctionName"], ".\n\[FilledSmallCircle] Setting ", StyleBox["HiddenFunctions", "FunctionName"], " effectively provides a list of functions that should be treated as \ built-in. Assuming the function concerned does not suppress argument \ evaluation you will see the arguments being evaluated, but none of the inner \ workings of the function (except the final result).\n\[FilledSmallCircle] \ Setting ", StyleBox["AbortStep", "FunctionName"], " can be useful when you know the step number (from a previous run of ", StyleBox["Dbg", "FunctionName"], ") when things start to go wrong, and you want a traceback at that point.\n\ \[FilledSmallCircle] The FilterHeads option can be useful in more complex \ situations where for example code in one package is to be debugged, but code \ in others is to be suppressed. In this case the filter could simply test the \ context of the head and retturn True or False as required." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Using colour with Dbg", "SubsubsectionIcon"], Cell[TextData[{ "\[FilledSmallCircle] Debugging a ", StyleBox["Mathematica", FontSlant->"Italic"], " program can seem like seeking a needle in a haystack! One way that ", StyleBox["Dbg", "FunctionName"], " can help is by colouring a piece of your code in such a way that the \ colour appears in your trace information. To colour part of your code, select \ an expression (subject to a few ", ButtonBox["restrictions", ButtonData:>"Colour restrictions", ButtonStyle->"Hyperlink"], " discussed below) and press the 'Coloured' button in the top part of the \ debugger palette. ", StyleBox["Colouring code in any other way (e.g. using the Format menu or \ option inspector) will not work, even though it may appear identical.", FontVariations->{"Underline"->True}], " Coloured expressions can be used from within ", StyleBox["Dbg", "FunctionName"], " or on their own. Here are some examples of what you can do with coloured \ expressions:" }], "Text"], Cell["\<\ \[FilledSmallCircle] Here we use a coloured expression on its own to obtain \ an intermediate print out. Notice how we see the expression before evaluation \ as well as its value.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"R", "=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"x", "=", "3"}], ",", RowBox[{"y", "=", "4"}]}], "}"}], ",", RowBox[{"Sqrt", "[", TagBox[ StyleBox[ RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], Background->RGBColor[0, 1, 1]], Identity], "]"}]}], "]"}]}]], "Input", CellLabel->"In[1]:="], Cell[BoxData[ RowBox[{ TagBox[ TagBox[ StyleBox[ RowBox[{ SuperscriptBox["3", "2"], "+", SuperscriptBox["4", "2"]}], Background->RGBColor[0, 1, 1]], Identity], (Short[ #, 4]&)], StyleBox[ TagBox["\<\" \[LongRightArrow] \"\>", (Short[ #, 4]&)], FontColor->RGBColor[0, 0, 1]], TagBox["25", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[OutputFormData["\<\ 5\ \>", "\<\ 5\ \>"], "Output", CellLabel->"Out[1]="] }, Open ]], Cell[TextData[{ "\[FilledSmallCircle] Here is the same calculation run under ", StyleBox["Dbg", "FunctionName"], ". The coloured expression produces the same printout (but embedded in the \ normal ", StyleBox["Dbg", "FunctionName"], " output) and also causes ", StyleBox["Dbg", "FunctionName"], " to suppress the internal details of its evaluation. Observe also how the \ coloured expression can be seen in earlier output from ", StyleBox["Dbg", "FunctionName"], " \[Dash] making it much easier to understand where the various steps have \ come from." }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{"R", "=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"x", "=", "3"}], ",", RowBox[{"y", "=", "4"}]}], "}"}], ",", RowBox[{"Sqrt", "[", TagBox[ StyleBox[ RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], Background->RGBColor[0, 1, 1]], Identity], "]"}]}], "]"}]}], ")"}], "//", RowBox[{"Dbg", "[", "]"}]}]], "Input", CellLabel->"In[3]:="], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_15_42_2_"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["1", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"R", "=", RowBox[{"With", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"x", "=", "3"}], ",", RowBox[{"y", "=", "4"}]}], "}"}], ",", SqrtBox[ TagBox[ StyleBox[ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], Background->RGBColor[0, 1, 1]], Identity]]}], "]"}]}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_15_42_2_5978"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_15_42_2_5978"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["2", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["With", (Short[ #, 4]&)], TagBox["\<\"[\"\>", (Short[ #, 4]&)], TagBox[ RowBox[{"{", RowBox[{ RowBox[{"x", "=", "3"}], ",", RowBox[{"y", "=", "4"}]}], "}"}], (Short[ #, 4]&)], TagBox["\<\",...\"\>", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_15_42_2_5978"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["3", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ SqrtBox[ TagBox[ StyleBox[ RowBox[{ SuperscriptBox["3", "2"], "+", SuperscriptBox["4", "2"]}], Background->RGBColor[0, 1, 1]], Identity]], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_15_42_2_5979"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["4", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ TagBox[ StyleBox[ RowBox[{ SuperscriptBox["3", "2"], "+", SuperscriptBox["4", "2"]}], Background->RGBColor[0, 1, 1]], Identity], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_15_42_2_5980"], Cell[BoxData[ RowBox[{ TagBox[ TagBox[ StyleBox[ RowBox[{ SuperscriptBox["3", "2"], "+", SuperscriptBox["4", "2"]}], Background->RGBColor[0, 1, 1]], Identity], (Short[ #, 4]&)], StyleBox[ TagBox["\<\" \[LongRightArrow] \"\>", (Short[ #, 4]&)], FontColor->RGBColor[0, 0, 1]], TagBox["25", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_15_42_2_5978"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["5", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ SqrtBox["25"], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_15_42_2_5978"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["6", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ SqrtBox["25"], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_15_42_2_5978"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["7", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["5", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_15_42_2_"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["8", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"R", "=", "5"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_15_42_2_5978"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_15_42_2_"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["9", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["5", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_15_42_2_5978"], Cell[BoxData[ StyleBox[ RowBox[{ TagBox["9", (Short[ #, 4]&)], TagBox["\<\" steps in all\"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData["5"], "Output", CellLabel->"Out[3]="] }, Open ]], Cell["\<\ \[FilledSmallCircle] Here we see the function that was used as an example \ earlier, but with some added colour. After adding colour it is important to \ re-execute the function definition to cause the colour to become part of the \ function definition in the kernel.\ \>", "Text"], Cell[BoxData[ RowBox[{ RowBox[{"dot\[Breve]product", "[", RowBox[{"x_List", ",", "y_List"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"k", "=", RowBox[{"Length", "[", "x", "]"}]}], ",", RowBox[{"ss", "=", "0"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"k", ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"ss", "=", RowBox[{"ss", "+", TagBox[ StyleBox[ RowBox[{ RowBox[{"x", "[", RowBox[{"[", "k", "]"}], "]"}], RowBox[{"y", "[", RowBox[{"[", "k", "]"}], "]"}]}], Background->RGBColor[0, 1, 1]], Identity]}]}], ";", "\[IndentingNewLine]", RowBox[{"k", "--"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "ss"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellLabel->"In[4]:="], Cell["\<\ \[FilledSmallCircle] Once again we can use the colour on its own, or under \ Dbg:\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"dot\[Breve]product", "[", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}]}], "]"}]], "Input", CellLabel->"In[5]:="], Cell["Starting", "Print", CellLabel->"From In[5]:="], Cell[BoxData[ RowBox[{ TagBox[ TagBox[ StyleBox[ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "\[LeftDoubleBracket]", "k$93", "\[RightDoubleBracket]"}], " ", RowBox[{ RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}], "\[LeftDoubleBracket]", "k$93", "\[RightDoubleBracket]"}]}], Background->RGBColor[0, 1, 1]], Identity], (Short[ #, 4]&)], StyleBox[ TagBox["\<\" \[LongRightArrow] \"\>", (Short[ #, 4]&)], FontColor->RGBColor[0, 0, 1]], TagBox["15", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ RowBox[{ TagBox[ TagBox[ StyleBox[ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "\[LeftDoubleBracket]", "k$93", "\[RightDoubleBracket]"}], " ", RowBox[{ RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}], "\[LeftDoubleBracket]", "k$93", "\[RightDoubleBracket]"}]}], Background->RGBColor[0, 1, 1]], Identity], (Short[ #, 4]&)], StyleBox[ TagBox["\<\" \[LongRightArrow] \"\>", (Short[ #, 4]&)], FontColor->RGBColor[0, 0, 1]], TagBox["8", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[OutputFormData["\<\ 23\ \>", "\<\ 23\ \>"], "Output", CellLabel->"Out[5]="] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"dot\[Breve]product", "[", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}]}], "]"}], "//", RowBox[{"Dbg", "[", RowBox[{"StartStep", "\[Rule]", "11"}], "]"}]}]], "Input", CellLabel->"In[10]:="], Cell["Starting", "Print", CellLabel->"From In[10]:=", Active->True, Background->RGBColor[1, 0.8, 0.8]], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_14_24_127"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["11", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["While", (Short[ #, 4]&)], TagBox["\<\"[\"\>", (Short[ #, 4]&)], TagBox[ RowBox[{"k$884", ">", "0"}], (Short[ #, 4]&)], TagBox["\<\",...\"\>", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_14_24_129"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_14_24_129"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["12", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"k$884", ">", "0"}], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_14_24_130"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_14_24_130"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["13", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["k$884", (Short[ #, 4]&)], StyleBox[ TagBox["\<\" \[LongRightArrow] \"\>", (Short[ #, 4]&)], FontColor->RGBColor[0, 0, 1]], TagBox["2", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_14_24_131"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_14_24_130"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["14", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["2", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_14_24_131"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_14_24_129"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["15", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"2", ">", "0"}], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_14_24_130"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_14_24_129"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["16", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["True", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_14_24_130"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_14_24_130"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["17", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"ss$884", "=", RowBox[{"ss$884", "+", TagBox[ StyleBox[ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "\[LeftDoubleBracket]", "k$884", "\[RightDoubleBracket]"}], " ", RowBox[{ RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}], "\[LeftDoubleBracket]", "k$884", "\[RightDoubleBracket]"}]}], Background->RGBColor[0, 1, 1]], Identity]}]}], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_14_24_132"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_14_24_132"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["18", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"ss$884", "+", TagBox[ StyleBox[ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "\[LeftDoubleBracket]", "k$884", "\[RightDoubleBracket]"}], " ", RowBox[{ RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}], "\[LeftDoubleBracket]", "k$884", "\[RightDoubleBracket]"}]}], Background->RGBColor[0, 1, 1]], Identity]}], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_14_24_133"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_14_24_133"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["19", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["ss$884", (Short[ #, 4]&)], StyleBox[ TagBox["\<\" \[LongRightArrow] \"\>", (Short[ #, 4]&)], FontColor->RGBColor[0, 0, 1]], TagBox["0", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_14_24_134"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_14_24_133"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["20", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["0", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_14_24_134"], Cell[BoxData[ StyleBox[ TagBox["\<\"Dbg print limit exceeded - execution continuing\"\>", (Short[ #, 4]&)], FontColor->RGBColor[1, 0, 0]]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ RowBox[{ TagBox[ TagBox[ StyleBox[ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "\[LeftDoubleBracket]", "k$884", "\[RightDoubleBracket]"}], " ", RowBox[{ RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}], "\[LeftDoubleBracket]", "k$884", "\[RightDoubleBracket]"}]}], Background->RGBColor[0, 1, 1]], Identity], (Short[ #, 4]&)], StyleBox[ TagBox["\<\" \[LongRightArrow] \"\>", (Short[ #, 4]&)], FontColor->RGBColor[0, 0, 1]], TagBox["15", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ RowBox[{ TagBox[ TagBox[ StyleBox[ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "\[LeftDoubleBracket]", "k$884", "\[RightDoubleBracket]"}], " ", RowBox[{ RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}], "\[LeftDoubleBracket]", "k$884", "\[RightDoubleBracket]"}]}], Background->RGBColor[0, 1, 1]], Identity], (Short[ #, 4]&)], StyleBox[ TagBox["\<\" \[LongRightArrow] \"\>", (Short[ #, 4]&)], FontColor->RGBColor[0, 0, 1]], TagBox["8", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ StyleBox[ RowBox[{ TagBox["60", (Short[ #, 4]&)], TagBox["\<\" steps in all\"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[OutputFormData["\<\ 23\ \>", "\<\ 23\ \>"], "Output", CellLabel->"Out[10]="] }, Open ]], Cell[TextData[{ "Observe that the total number of steps is now 60, rather than 84. This is \ because the evaluation of the coloured expression is performed in one step. \ Notice also that coloured expressions still print out even after the default \ ", StyleBox["MaxSteps", "FunctionName"], " value of 10 is exceeded. " }], "Text"], Cell[TextData[{ "\[FilledSmallCircle] Coloured expressions can also be used as breakpoints. \ Pressing the \"colour break\" button while a program is suspended will run it \ until the next coloured expression is encountered. Remeber that the contents \ of the coloured expression will be evaluated as one step, and cannot \ therefore be stepped into, so if you want to run your program until an \ expression foo[a,b,c] is reached and then to step through that evaluation \ colour the head ", StyleBox["foo", "FunctionName"], ", rather than the whole expression." }], "Text"], Cell["\<\ \[FilledSmallCircle] By colouring something in a function definition with \ several parts it can become obvious which part was actually used in a \ particular case:\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"f", "[", RowBox[{"x_", "?", "NumberQ"}], "]"}], ":=", TagBox[ StyleBox["True", Background->RGBColor[0, 1, 1]], Identity]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f", "[", "x_List", "]"}], ":=", "True"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f", "[", "\[Pi]", "]"}], ":=", "True"}], ";"}]}], "Input", CellLabel->"In[4]:="], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"f", "[", "3.1415", "]"}], "//", RowBox[{"Dbg", "[", "]"}]}]], "Input", CellLabel->"In[8]:="], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_16_5_58_"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["1", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"f", "[", "3.1415`", "]"}], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_16_5_58_45"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_16_5_58_45"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["2", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"NumberQ", "[", "3.1415`", "]"}], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_16_5_58_46"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_16_5_58_45"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["3", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["True", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_16_5_58_46"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_16_5_58_"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["4", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ TagBox[ StyleBox["True", Background->RGBColor[0, 1, 1]], Identity], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_16_5_58_45"], Cell[BoxData[ StyleBox[ RowBox[{ TagBox["4", (Short[ #, 4]&)], TagBox["\<\" steps in all\"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[OutputFormData["\<\ True\ \>", "\<\ True\ \>"], "Output", CellLabel->"Out[8]="] }, Open ]], Cell[TextData[{ "\[FilledSmallCircle] Sometimes it is useful to colour the head of an \ expression \[Dash] simply to make it stand out in the ", StyleBox["Dbg", "FunctionName"], " output. This case is treated specially and the value printout is \ suppressed." }], "Text"], Cell[BoxData[ RowBox[{ RowBox[{"dot\[Breve]product", "[", RowBox[{"x_List", ",", "y_List"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"k", "=", RowBox[{ TagBox[ StyleBox["Length", Background->RGBColor[0, 1, 1]], Identity], "[", "x", "]"}]}], ",", RowBox[{"ss", "=", "0"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", "\"\\"", "]"}], ";", "\[IndentingNewLine]", RowBox[{"While", "[", RowBox[{ RowBox[{"k", ">", "0"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{"ss", "=", RowBox[{"ss", "+", RowBox[{ RowBox[{"x", "[", RowBox[{"[", "k", "]"}], "]"}], RowBox[{"y", "[", RowBox[{"[", "k", "]"}], "]"}]}]}]}], ";", "\[IndentingNewLine]", RowBox[{"k", "--"}], ";"}]}], "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", "ss"}]}], "\[IndentingNewLine]", "]"}]}]], "Input", CellLabel->"In[2]:="], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"dot\[Breve]product", "[", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}]}], "]"}], "//", RowBox[{"Dbg", "[", "]"}]}]], "Input", CellLabel->"In[3]:="], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_30_25_"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["1", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"dot\[Breve]product", "[", RowBox[{ RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "5"}], "}"}]}], "]"}], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_30_25_7"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_30_25_"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["2", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["Module", (Short[ #, 4]&)], TagBox["\<\"[\"\>", (Short[ #, 4]&)], TagBox[ RowBox[{"{", RowBox[{ RowBox[{"k$", "=", RowBox[{ TagBox[ StyleBox["Length", Background->RGBColor[0, 1, 1]], Identity], "[", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "]"}]}], ",", RowBox[{"ss$", "=", "0"}]}], "}"}], (Short[ #, 4]&)], TagBox["\<\",...\"\>", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_30_25_7"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_30_25_7"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["3", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{ TagBox[ StyleBox["Length", Background->RGBColor[0, 1, 1]], Identity], "[", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "]"}], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_30_25_8"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_30_25_8"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["4", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ TagBox[ StyleBox["Length", Background->RGBColor[0, 1, 1]], Identity], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_30_25_9"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_30_25_7"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["5", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"Length", "[", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], "]"}], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_30_25_8"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_30_25_7"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["6", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["2", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_30_25_8"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_30_25_7"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["7", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"k$81", "=", "2"}], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_30_25_10"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_30_25_7"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["8", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["2", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_30_25_10"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_30_25_7"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["9", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"ss$81", "=", "0"}], (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_30_25_11"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_9_15_30_25_7"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["10", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["0", (Short[ #, 4]&)]}]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_9_15_30_25_11"], Cell[BoxData[ StyleBox[ TagBox["\<\"Dbg print limit exceeded - execution continuing\"\>", (Short[ #, 4]&)], FontColor->RGBColor[1, 0, 0]]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell["Starting", "Print", CellLabel->"From In[3]:=", Active->True, Background->RGBColor[1, 0.8, 0.8]], Cell[BoxData[ StyleBox[ RowBox[{ TagBox["86", (Short[ #, 4]&)], TagBox["\<\" steps in all\"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]], "Print", Active->True, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[OutputFormData["\<\ 23\ \>", "\<\ 23\ \>"], "Output", CellLabel->"Out[3]="] }, Open ]], Cell[TextData[{ "\[FilledSmallCircle] Obviously, the expression to be coloured must be a \ syntactically valid expression. The simplest way to ensure this is to use \ multi-clicking to select the expression to be coloured. Furthermore, colour \ must not be added to the left of := or = in a function definition, or in \ places where it will not get evaluated (e.g. inside ", StyleBox["Hold", "FunctionName"], ", ", StyleBox["MakeExpression", "FunctionName"], ", inside strings, etc.). Note that in an expression such as:" }], "Text", CellTags->"Colour restrictions"], Cell[BoxData[ RowBox[{ RowBox[{"foo", "[", RowBox[{"[", RowBox[{"k", "+", "1"}], "]"}], "]"}], "=", "z"}]], "Input"], Cell[TextData[{ "the expression k+1 ", StyleBox["is", FontVariations->{"Underline"->True}], " evaluated, so it may be coloured even though it is on the left of an \ assignment. See the help on ", StyleBox["Set", "FunctionName"], " for full details." }], "Text"], Cell[TextData[{ "\[FilledSmallCircle] Coloured expressions are represented using a special \ debugger function, ", StyleBox["Dbg\[Breve]Coloured", "FunctionName"], ", that evaluates to its argument. Ii is possible to save a notebook \ containing coloured expressions as part of function definitions. If the ", StyleBox["Dbg", "FunctionName"], " package is loaded the next time the contents of the notebook are \ evaluated, then the colour will work just as before. If however the ", StyleBox["Dbg", "FunctionName"], " package is not loaded the colour will have no special effect - the code \ will perform just as it would without colour. This can obviously be useful \ when you need to try some 'production runs' with code that is still under \ test." }], "Text"], Cell[TextData[{ "\[FilledSmallCircle] Colour can be removed from your notebook when no \ longer required by click selecting the relevant coloured expression and \ pressing the 'Remove colour' button. This button will remove all the colour \ within a selection \[Dash] possibly including several separate coloured \ expressions. If, say, the entire contents of a notebook are selected, this \ button will remove all the colour in one go.\n\[FilledSmallCircle] Colour \ introduced using ", StyleBox["Dbg", "FunctionName"], " is different from that introduced by the ", StyleBox["S", FontColor->RGBColor[0, 0, 1]], "alford ", StyleBox["C", FontColor->RGBColor[1, 0, 0]], "olour ", StyleBox["M", FontColor->RGBColor[0, 1, 0]], "ath ", ButtonBox["package for algebraic manipulation", ButtonData:>{ URL[ "http://www.salford.co.uk/mathematica/cexp_file.html"], None}, ButtonStyle->"Hyperlink"], " (although the mode of operation is broadly similar). Because ", StyleBox["Dbg", "FunctionName"], " colours the background rather than the text itself, these two \ applications of colour should not become confused." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Stepping and breakpoint facilities", "SubsubsectionIcon", CellTags->"Breakpoint"], Cell[TextData[{ "Dbg has a simple breakpoint mechanism, which can be accessed by setting \ Step->True to break at the very first step of your code, or by using the ", StyleBox["BreakAt", "FunctionName"], " option to specify a pattern at which to break. Whenever the program is \ suspended this fact will be observable because the cell bracket of the \ original input cell will indicate that this calculation is still running. \ However, it is possible to execute almost any ", StyleBox["Mathematica", FontSlant->"Italic"], " calculation while a program is suspended, and the lower set of debugger \ buttons become available. These buttons have the following effect:\n\n", Cell[BoxData[GridBox[{ { StyleBox["Resume", FontWeight->"Bold"], RowBox[{"Restarts", " ", "the", " ", RowBox[{"program", "."}]}]}, { StyleBox["Step", FontWeight->"Bold"], RowBox[{ "Advances", " ", "the", " ", "program", " ", "by", " ", "one", " ", RowBox[{"step", "."}]}]}, { StyleBox[ RowBox[{"Step", " ", "over"}], FontWeight->"Bold"], RowBox[{ RowBox[{ "Breaks", " ", "the", " ", "program", " ", "when", " ", "the", " ", "current", " ", "expression", " ", "being"}], "\[IndentingNewLine]", RowBox[{"evaluated", " ", "is", " ", RowBox[{"complete", "."}]}]}]}, { StyleBox[ RowBox[{"Set", " ", "breakpoint"}], FontWeight->"Bold"], RowBox[{ RowBox[{ RowBox[{ "Prompts", " ", "for", " ", "a", " ", "new", " ", "pattern", " ", "to", " ", "act", " ", "as", " ", "a", " ", "breakpoint"}], ",", " ", "\[IndentingNewLine]", RowBox[{ "then", " ", "runs", " ", "the", " ", "program", " ", "until", " ", "an", " ", "expression", " ", "matching", " ", "this"}]}], "\[IndentingNewLine]", RowBox[{"pattern", " ", "is", " ", RowBox[{"encountered", "."}]}]}]}, { StyleBox[ RowBox[{"Colour", " ", "break"}], FontWeight->"Bold"], RowBox[{ "Runs", " ", "the", " ", "program", " ", "until", " ", "a", " ", "coloured", " ", "expression", " ", "is", " ", RowBox[{"encountered", "."}]}]}, { StyleBox["Traceback", FontWeight->"Bold"], RowBox[{ "Prints", " ", "a", " ", "traceback", " ", "corresponding", " ", "to", " ", "the", " ", "current", " ", RowBox[{"point", "."}]}]}, { StyleBox["Abort", FontWeight->"Bold"], RowBox[{"Abandons", " ", "this", " ", "debug", " ", RowBox[{"session", "."}]}]} }, ColumnAlignments->{Left}, GridFrame->True, RowLines->True, ColumnLines->True]]], "\n" }], "Text"], Cell[TextData[{ "\[FilledSmallCircle] While a program is suspended by ", StyleBox["Dbg", "FunctionName"], ", you should not use the top set of debugger buttons. Also, any attempt to \ start another (nested) ", StyleBox["Dbg", "FunctionName"], " session will be faulted.\n\[FilledSmallCircle] Subject to these minor \ restrictions, the whole power of ", StyleBox["Mathematica", FontSlant->"Italic"], " is available while the program is suspended. In particular, you can type \ the name of any variable and obtain its current value in the usual way. This \ can be particularly useful when debugging programs containing explicit loops.\ \n\[FilledSmallCircle] Bear in mind that local variables in ", StyleBox["Module", "FunctionName"], " constructs etc. will have been renamed in the standard ", StyleBox["Mathematica", FontSlant->"Italic"], " way. You must determine the new name (which corresponds to the old name \ with a '$' and a number appended) in order to interrogate its value. The new \ name will vary from run to run, so it may be worth setting a breakpoint at a \ point where the name can be established, or adding a ", StyleBox["Print", "FunctionName"], " call to your program to establish the name in question, for example:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "k", "}"}], ",", RowBox[{ RowBox[{"Print", "[", "k", "]"}], ";", RowBox[{"k", "=", "1"}], ";", RowBox[{"foo", "[", "k", "]"}]}]}], "]"}], "//", RowBox[{"Dbg", "[", RowBox[{"BreakAt", "\[RuleDelayed]", RowBox[{"foo", "[", "_", "]"}]}], "]"}]}]], "Input", CellLabel->"In[1]:="], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_14_10_17_"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["1", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["Module", (Short[ #, 4]&)], TagBox["\<\"[\"\>", (Short[ #, 4]&)], TagBox[ RowBox[{"{", "k", "}"}], (Short[ #, 4]&)], TagBox["\<\",...\"\>", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_14_10_17_3"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_14_10_17_3"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["2", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"Print", "[", "k$46", "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_14_10_17_4"], Cell[BoxData["k$46"], "Print", CellLabel->"From In[1]:="], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_14_10_17_3"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["3", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["Null", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_14_10_17_4"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_14_10_17_3"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["4", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"k$46", "=", "1"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_14_10_17_5"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_14_10_17_3"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["5", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["1", (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_14_10_17_5"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic, Active->True], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg_2000_2_16_14_10_17_3"], ButtonEvaluator->Automatic, Active->True], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["6", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"foo", "[", "k$46", "]"}], (Short[ #, 4]&)]}]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg_2000_2_16_14_10_17_6"], Cell[BoxData[ StyleBox[ TagBox["\<\"Breakpoint encountered\"\>", (Short[ #, 4]&)], FontColor->RGBColor[1, 0, 0]]], "Print", Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData["k$46"], "Input", CellLabel->"(Dialog) In[2]:="], Cell[BoxData["1"], "Output", CellLabel->"(Dialog) Out[2]="] }, Open ]], Cell[TextData[{ "We knew the name ", StyleBox["k$46", "FunctionName"], " because of the ", StyleBox["Print", "FunctionName"], " statement. Alternatively, the expression k=1 could have been coloured, so \ that the name of ", StyleBox["k", "FunctionName"], " could be determined from the usual colour printout.\n\[FilledSmallCircle] \ Note that the BreakAt option uses the '\[RuleDelayed]' operator to prevent \ any spurious evaluation of the pattern itself. \n\[FilledSmallCircle] \ Currently only one breakpoint can be in effect at any one time. A more ", ButtonBox["general scheme", ButtonData:>"Future", ButtonStyle->"Hyperlink"], " may be implemented later." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Using Dbg with packages", "SubsubsectionIcon"], Cell[TextData[{ "\[FilledSmallCircle] When you load in a package you are adding a quantity \ of code that has been written by someone else. Usually you have no interest \ in the inner workings of package code and do not want to debug it with ", StyleBox["Dbg", "FunctionName"], ". For this reason, by default ", StyleBox["Dbg", "FunctionName"], " treats all functions belonging to packages as hidden. You can reverse \ this behaviour by setting the option ", StyleBox["SuppressPackages", "FunctionName"], " to ", StyleBox["False", "FunctionName"], ". \n\[FilledSmallCircle] Even some apparently built-in functions, such as \ ", StyleBox["CellPrint", "FunctionName"], ", are actually implemented using a built-in package. Normally you only \ become aware of this if you use ", StyleBox["TracePrint", "FunctionName"], " (say) on a ", StyleBox["CellPrint", "FunctionName"], " call. Since such internal code is in a package, ", StyleBox["Dbg", "FunctionName"], " also suppresses this by default. The internal workings of such functions \ can be interesting, but not usually when you are debugging higher level \ code." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Programs that fault or loop for ever", "SubsubsectionIcon"], Cell[TextData[{ "\[FilledSmallCircle] When ", StyleBox["Mathematica", FontSlant->"Italic"], " generates a kernel message this is usually a sign that your program has \ failed. Therefore unless a message has been suppressed (e.g. using ", StyleBox["Off", "FunctionName"], "), ", StyleBox["Dbg", "FunctionName"], " treats such messages as fatal errors and prints a traceback of the \ expressions leading to the error. For example:" }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"f1", "[", "x_", "]"}], ":=", RowBox[{"f2", "[", "x", "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"f2", "[", "x_", "]"}], ":=", RowBox[{"1", "/", "x"}]}], ";"}]}], "Input", CellLabel->"In[8]:="], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"f1", "[", "0", "]"}], "//", RowBox[{"Dbg", "[", RowBox[{"StartStep", "\[Rule]", "20"}], "]"}]}]], "Input", CellLabel->"In[11]:="], Cell[BoxData[ RowBox[{ RowBox[{"Power", "::", "\<\"infy\"\>"}], RowBox[{ ":", " "}], "\<\"Infinite expression \\!\\(1\\/0\\) \ encountered.\"\>"}]], "Message", CellLabel->"From In[11]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ StyleBox[ RowBox[{ TagBox["\<\"Dbg aborting at step \"\>", (Short[ #, 4]&)], TagBox["4", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ RowBox[{ StyleBox[ TagBox["\<\"While evaluating: \"\>", (Short[ #, 4]&)], FontColor->RGBColor[1, 0, 0]], TagBox[ FractionBox["1", "0"], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ RowBox[{ StyleBox[ TagBox["\<\"While evaluating: \"\>", (Short[ #, 4]&)], FontColor->RGBColor[1, 0, 0]], TagBox[ FractionBox["1", "0"], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ RowBox[{ StyleBox[ TagBox["\<\"While evaluating: \"\>", (Short[ #, 4]&)], FontColor->RGBColor[1, 0, 0]], TagBox[ RowBox[{"f2", "[", "0", "]"}], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ RowBox[{ StyleBox[ TagBox["\<\"While evaluating: \"\>", (Short[ #, 4]&)], FontColor->RGBColor[1, 0, 0]], TagBox[ RowBox[{"f1", "[", "0", "]"}], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ StyleBox[ RowBox[{ TagBox["4", (Short[ #, 4]&)], TagBox["\<\" steps in all\"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData["$Aborted"], "Output", CellLabel->"Out[11]=", GeneratedCell->False, CellAutoOverwrite->False] }, Open ]], Cell["\<\ \[FilledSmallCircle] As you can see, the traceback is generated whether or \ not steps are being printed at the time of the error. After printing the \ traceback the program is aborted.\ \>", "Text"], Cell[TextData[{ "\[FilledSmallCircle] Some software bugs result in code that runs for ever. \ Sometimes such code continues to consume some resource, such as memory or \ disk space, and so fails eventually, in other cases the program has to be \ explicitly stopped. ", StyleBox["Mathematica", FontSlant->"Italic"], " includes certain limits to try to prevent programs running out of control \ like this, however these limits have to be set quite high, and frequently \ users must raise them further to get legitimate code to work. Here is a \ typical problem:" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Module", "[", RowBox[{ RowBox[{"{", "x", "}"}], ",", RowBox[{"x", "=", RowBox[{"x", "+", "1"}]}]}], "]"}]], "Input", CellLabel->"In[1]:="], Cell[BoxData[ RowBox[{ RowBox[{"$RecursionLimit", "::", "\<\"reclim\"\>"}], RowBox[{ ":", " "}], "\<\"Recursion depth of \\!\\(256\\) exceeded.\"\>"}]], \ "Message", CellLabel->"From In[1]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ RowBox[{"254", "+", RowBox[{"Hold", "[", RowBox[{"1", "+", "x$29"}], "]"}]}]], "Output", CellLabel->"Out[1]=", GeneratedCell->False, CellAutoOverwrite->False] }, Open ]], Cell[TextData[{ "As you can see, it is rather easy to encounter infinite loops in ", StyleBox["Mathematica", FontSlant->"Italic"], " code. In the example the problem is simply that 'x' has no value. If this \ were C or Fortran code (say) it would either generate a compiler error, a \ runtime error, or produce an x with an arbitrary numeric value. Because ", StyleBox["Mathematica", FontSlant->"Italic"], " handles symbolic as well as numeric data, execution proceeds as follows: \ First x acquires the symbolic expression x+1, then, because the value of x \ has changed the expression gets re-evaluated and assigned to x, so x acquires \ the symbolic value x+2, ... If you are not sure about this try applying ", StyleBox["Dbg", "FunctionName"], " to this expression and observe what happens!" }], "Text"], Cell[TextData[{ "If you press the Abort button in the debugger palette this will send a \ message to ", StyleBox["Dbg", "FunctionName"], " to print a few steps (regardless of the options used to ", StyleBox["Dbg", "FunctionName"], "), and then print a trace back as if the ", StyleBox["AbortStep", "FunctionName"], " had been reached. If you need more steps printed out to understand the \ context of the loop, simply run again with ", StyleBox["StartStep", "FunctionName"], " set appropriately, or change the ", StyleBox["AbortStepCount", "FunctionName"], " option. \n\n\[FilledSmallCircle] Pressing Abort will only work if your \ code is actually stuck in a kernel loop. It is easy to see this by looking at \ the status bar of the debugger palette, where the step number should be \ changing. ", StyleBox["Mathematica", FontSlant->"Italic"], " can stop for a variety of other reasons. A common reason is if your \ program returns an unreasonable amount of output to the frontend (e.g. a 1000 \ x 1000 matrix!). \n\[FilledSmallCircle] If you use the normal built-in abort \ operation, \[AltKey]+., you will abort your program but receive no further \ information from ", StyleBox["Dbg", "FunctionName"], ".\n\[FilledSmallCircle] Sometimes it is more useful to suspend the program \ as if a breakpoint had been reached when a program generates an error message \ or is aborted by pressing \"Abort process\". This can be achieved by setting \ the option ", StyleBox["BreakFail", "FunctionName"], " to ", StyleBox["True", "FunctionName"], ". A process that has been interrupted using the button can be resumed or \ stepped just as if a normal breakpoint had been reached, however programs \ that had reached an error condition will simply abort if they are resumed." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Some comparisons with Trace", "SubsubsectionIcon"], Cell[TextData[{ "\[FilledSmallCircle] ", StyleBox["Dbg", "FunctionName"], " uses ", StyleBox["TraceScan", "FunctionName"], " at its heart to perform its work. However, as you will see if you look at \ the file DEBUGGER.M, Dbg performs a considerable amount of extra work on top. \ ", StyleBox["Dbg", "FunctionName"], " achieves a number of important improvements in the output which are \ discussed in this section. If you are not interested in the built-in ", StyleBox["Mathematica", FontSlant->"Italic"], " Trace functions, then you may wish to skip this section. All the ", StyleBox["Trace", "FunctionName"], " functions operate in essentially the same way, so ", StyleBox["TracePrint", "FunctionName"], " is used in the illustrations that follow for ease of comparison with ", StyleBox["Dbg", "FunctionName"], "." }], "Text"], Cell["\<\ \[FilledSmallCircle] Consider the following piece of code:\ \>", "Text"], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"f", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{"h", "[", "x", "]"}], "+", RowBox[{"h", "[", RowBox[{"2", " ", "x"}], "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"h", "[", "x_", "]"}], ":=", RowBox[{"If", "[", RowBox[{ RowBox[{"x", ">", "0"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"2", " ", "x"}], "+", "1"}], ")"}], "/", RowBox[{"(", RowBox[{ RowBox[{"2", " ", "x"}], "-", "1"}], ")"}]}], ",", "0"}], "]"}]}]}], "Input", CellLabel->"In[13]:="], Cell["\<\ \[FilledSmallCircle] Suppose we want to debug this function without \ displaying the inner workings of the function h - we type the following.\ \>", "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"f", "[", "3", "]"}], "//", RowBox[{"Dbg", "[", RowBox[{"HiddenFunctions", "\[Rule]", "h"}], "]"}]}]], "Input", CellLabel->"In[15]:="], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ ""], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["1", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"f", "[", "3", "]"}], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$494"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ ""], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["2", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{ RowBox[{"h", "[", "3", "]"}], "+", RowBox[{"h", "[", RowBox[{"2", " ", "3"}], "]"}]}], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$494"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg$494"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["3", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"h", "[", "3", "]"}], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$514"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg$494"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["4", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"h", "[", RowBox[{"2", " ", "3"}], "]"}], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$546"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg$546"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["5", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"2", " ", "3"}], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$555"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg$546"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["6", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox["6", (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$555"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ "Dbg$494"], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["7", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{"h", "[", "6", "]"}], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$546"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ ""], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["8", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ RowBox[{ FractionBox["7", "5"], "+", FractionBox["13", "11"]}], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$494"], Cell[BoxData[ RowBox[{ RowBox[{ ButtonBox[ StyleBox["?", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select[ ], ButtonEvaluator->Automatic], ButtonBox[ StyleBox["\[UpArrow]", FontWeight->"Bold"], ButtonFunction:>SalfDebug`Private`Dbg\[Breve]Select\[Breve]Up[ ""], ButtonEvaluator->Automatic], StyleBox[ RowBox[{ TagBox["\<\"(\"\>", (Short[ #, 4]&)], TagBox["9", (Short[ #, 4]&)], TagBox["\<\") \"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]}], TagBox[ FractionBox["142", "55"], (Short[ #, 4]&)]}]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Dbg$494"], Cell[BoxData[ StyleBox[ RowBox[{ TagBox["9", (Short[ #, 4]&)], TagBox["\<\" steps in all\"\>", (Short[ #, 4]&)]}], FontColor->RGBColor[1, 0, 0]]], "Print", Active->True, GeneratedCell->False, CellAutoOverwrite->False, Background->RGBColor[1, 0.8, 0.8], CellTags->"Info"], Cell[BoxData[ FractionBox["142", "55"]], "Output", CellLabel->"Out[15]=", GeneratedCell->False, CellAutoOverwrite->False] }, Open ]], Cell[TextData[{ "Now we compare this with the analogous operation using ", StyleBox["TracePrint", "FunctionName"], ":" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"TracePrint", "[", RowBox[{ RowBox[{"f", "[", "3", "]"}], ",", RowBox[{"TraceOff", "\[Rule]", RowBox[{"h", "[", "_", "]"}]}]}], "]"}]], "Input", CellLabel->"In[16]:="], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox[ RowBox[{"f", "[", "3", "]"}], HoldForm]}], SequenceForm[ Indent[ 1], HoldForm[ f[ 3]]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox["f", HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ f]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox["3", HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ 3]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox[ RowBox[{ RowBox[{"h", "[", "3", "]"}], "+", RowBox[{"h", "[", RowBox[{"2", " ", "3"}], "]"}]}], HoldForm]}], SequenceForm[ Indent[ 1], HoldForm[ Plus[ h[ 3], h[ Times[ 2, 3]]]]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox["Plus", HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ Plus]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox[ RowBox[{"h", "[", "3", "]"}], HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ h[ 3]]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox[ FractionBox["7", "5"], HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ Rational[ 7, 5]]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox[ RowBox[{"h", "[", RowBox[{"2", " ", "3"}], "]"}], HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ h[ Times[ 2, 3]]]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox[ FractionBox["13", "11"], HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ Rational[ 13, 11]]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox[ RowBox[{ FractionBox["7", "5"], "+", FractionBox["13", "11"]}], HoldForm]}], SequenceForm[ Indent[ 1], HoldForm[ Plus[ Rational[ 7, 5], Rational[ 13, 11]]]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox[ FractionBox["142", "55"], HoldForm]}], SequenceForm[ Indent[ 1], HoldForm[ Rational[ 142, 55]]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox["Rational", HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ Rational]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox["142", HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ 142]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData["\<\"\"\>"], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ InterpretationBox[ RowBox[{" ", "\[InvisibleSpace]", TagBox["55", HoldForm]}], SequenceForm[ Indent[ 2], HoldForm[ 55]], Editable->False]], "Print", CellLabel->"From In[16]:=", GeneratedCell->False, CellAutoOverwrite->False], Cell[BoxData[ FractionBox["142", "55"]], "Output", CellLabel->"Out[16]=", GeneratedCell->False, CellAutoOverwrite->False] }, Open ]], Cell[TextData[{ "In addition to suppressing the inner workings of the function h, ", StyleBox["TracePrint", "FunctionName"], " has suppressed the details of the evaluation of the arguments of h. Thus \ we do not see the evaluation of the product (2 3). Clearly, in a more \ complicated example this omission could be important. Using the ", StyleBox["HiddenFunctions", "FunctionName"], " option of ", StyleBox["Dbg", "FunctionName"], " (or the implicit hiding of packaged functions) causes ", StyleBox["Dbg", "FunctionName"], " to treat the function concerned as if it were totally built-in (such as \ ", StyleBox["Sin", "FunctionName"], "). Thus the argument evaluation is shown, but the inner workings of the \ function are suppressed. \nNote that if the function has attributes such as \ ", StyleBox["HoldAll", "FunctionName"], ", the argument evaluation is delayed until inside the function (if at \ all), so in this case the details would not be printed." }], "Text"], Cell[TextData[{ "\[FilledSmallCircle] As you will see if you examine the code, ", StyleBox["Dbg", "FunctionName"], " succeeds in hiding the workings of hidden functions by altering their ", StyleBox["DownValues", "FunctionName"], " \[LongDash] effectively altering their definition. This alteration is \ made in the kernel, so the contents of the notebook itself are not changed, \ also the alteration is reversed before ", StyleBox["Dbg", "FunctionName"], " exits, however care should be taken with certain types of code. \ Essentially, you should not suppress the operation of functions that will be \ modified on the fly while the code is executing. For example, if the function \ tt is used as a lookup table that is created as your code executes, do not \ pass its name to the ", StyleBox["HiddenFunctions", "FunctionName"], " option of ", StyleBox["Dbg", "FunctionName"], ". This restriction does not apply to deeper functions inside a hidden \ function (which is obviously the usual case) so it is rarely troublesome." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Future developments", "SubsubsectionIcon", CellTags->"Future"], Cell[TextData[{ "Clearly ", StyleBox["Dbg", "FunctionName"], " can be developed in various ways. Depending on the feedback I receive, \ some or all of the following may get implemented:\n\[FilledSmallCircle] The \ interactive breakpoint facilities are quite limited at present, partly \ because they are based on the use of a palette. Clearly if ", StyleBox["Dbg", "FunctionName"], " had a set of commands that could be typed (or maybe one ", StyleBox["Dbg\[Breve]Resume", "FunctionName"], " with a variety of options) debugging could become more flexible.\n\ \[FilledSmallCircle] The lists of constructs which are abbreviated (such as \ ", StyleBox["Module", "FunctionName"], ") or hidden (such as ", StyleBox["CompoundExpression", "FunctionName"], ") may be augmented as necessary.\n\[FilledSmallCircle] If possible I will \ reduce the large performance overhead introduced by ", StyleBox["Dbg", "FunctionName"], ". To some extent this is inevitable (unless certain critical routines were \ moved inside ", StyleBox["Mathematica ", FontSlant->"Italic"], "itself!) because each step of user code must be processed inside ", StyleBox["Dbg", "FunctionName"], ", even if it is not printed.\n\[FilledSmallCircle] Currently ", StyleBox["Dbg", "FunctionName"], " always treats displayed kernel messages as fatal \[Dash] resulting in a \ traceback and a program abort. Where this prevents a valid program from \ running it is only necessary to use ", StyleBox["Off", "FunctionName"], " to suppress the relevant messages. However it may be that it may be \ useful to lift this restriction in some way." }], "Text"] }, Closed]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowSize->{1016, 668}, WindowMargins->{{0, Automatic}, {Automatic, 33}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, PageFooters->{{Inherited, Cell[ TextData[ {"\[Copyright]1998 Salford Software Ltd."}], "PageFooter"], Inherited}, {Inherited, Cell[ TextData[ {"\[Copyright]1998 Salford Software Ltd."}], "PageFooter"], Inherited}}, PrivateNotebookOptions->{"ShortBoxForm"->False}, ShowCellBracket->True, ShowCellLabel->False, Magnification->1.5, StyleDefinitions -> Notebook[{ Cell[CellGroupData[{ Cell["Style Definitions for CourseWare", "Subtitle"], Cell[TextData[{ "These styles are used by all the SalfordSoftware ", StyleBox["Mathematica", FontSlant->"Italic"], " course materials. If you decide to alter these styles it is recommended \ that you take a backup copy of Couseware.nb before proceding." }], "Text"], Cell[CellGroupData[{ Cell["Style Environment Names", "Subsubsection"], Cell[StyleData[All, "Working"], PageWidth->WindowWidth, ScriptMinSize->9], Cell[StyleData[All, "Printout"], PageWidth->PaperWidth, ScriptMinSize->5, FontSize->10, PrivateFontOptions->{"FontType"->"Outline"}] }, Open ]], Cell[CellGroupData[{ Cell["Notebook Options", "Subsubsection"], Cell["\<\ The options defined for the style below will be used at the Notebook level. \ \ \>", "Text"], Cell[StyleData["Notebook"], PageHeaders->{{Cell[ TextData[ {""}], "PageNumber"], None, Cell[ TextData[ {""}], "PageHeader"]}, {Cell[ TextData[ {""}], "PageHeader"], None, Cell[ TextData[ {""}], "PageNumber"]}}, PageFooters->{{None, Cell[ TextData[ {""}], "PageFooter"], None}, {None, Cell[ TextData[ {""}], "PageFooter"], None}}, PageHeaderLines->{True, True}, PageFooterLines->{True, True}, PrintingOptions->{"FacingPages"->True}, ShowCellLabel->False, CellLabelAutoDelete->False, StyleMenuListing->None, Background->RGBColor[0.976577, 0.964858, 0.703136]] }, Open ]], Cell[CellGroupData[{ Cell["Headings", "Subsubsection"], Cell[CellGroupData[{ Cell[StyleData["Chapter"], ShowCellBracket->False, CellMargins->{{10, 4}, {4, 24}}, FontFamily->"Helvetica", FontSize->24, FontWeight->"Bold"], Cell[StyleData["Chapter", "Printout"], CellMargins->{{2, 0}, {0, 18}}, PageBreakBelow->False, FontSize->22] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Section"], CellMargins->{{10, 4}, {12, 18}}, FontFamily->"Helvetica", FontSize->20, FontWeight->"Bold"], Cell[StyleData["Section", "Printout"], CellMargins->{{2, 0}, {0, 18}}, PageBreakBelow->False, FontSize->18] }, Open ]], Cell[CellGroupData[{ Cell[StyleData["Subsection"], CellDingbat->"\[FilledSquare]", ShowCellBracket->False, CellMargins->{{24, 4}, {0, 18}}, CellElementSpacings->{"ClosedGroupTopMargin"->18}, CellFrameLabelMargins->6, FontFamily->"Helvetica", FontSize->12, FontWeight->"Bold"], Cell[StyleData["Subsection", "Printout"], CellMargins->{{16, 0}, {0, 18}}, PageBreakBelow->False, FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[StyleData["Subsubsection"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 18}}, CellElementSpacings->{"ClosedGroupTopMargin"->18}, FontFamily->"Helvetica", FontSize->12, FontWeight->"Bold"], Cell[StyleData["Subsubsection", "Printout"], CellMargins->{{2, 0}, {0, 18}}, PageBreakBelow->False, FontSize->10] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["SubsubsectionColor"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 18}}, CellElementSpacings->{"ClosedGroupTopMargin"->18}, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->12, FontWeight->"Bold", FontColor->RGBColor[0.297993, 0, 0.454994]], Cell[StyleData["SubsubsectionColor", "Printout"], CellMargins->{{2, 0}, {0, 18}}, PageBreakBelow->False, FontSize->10] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["SubsectionIcon"], ShowGroupOpenCloseIcon->True, CellMargins->{{24, 4}, {0, 18}}, CellElementSpacings->{"ClosedGroupTopMargin"->8}, CellGroupingRules->{"SectionGrouping", 50}, CounterIncrements->"Section", FontFamily->"Helvetica", FontSize->12, FontWeight->"Bold"], Cell[StyleData["SubsectionIcon", "Printout"], CellDingbat->"\[FilledSquare]", ShowGroupOpenCloseIcon->False, CellMargins->{{16, 0}, {0, 18}}, PageBreakBelow->False, FontSize->14] }, Open ]], Cell[CellGroupData[{ Cell[StyleData["SubsubsectionIcon"], ShowCellBracket->False, ShowGroupOpenCloseIcon->True, CellMargins->{{24, 4}, {0, 8}}, CellElementSpacings->{"ClosedGroupTopMargin"->4}, CellGroupingRules->{"SectionGrouping", 60}, CounterIncrements->"Subsection", CounterAssignments->{{"Subsubection", 0}}, FontFamily->"Helvetica", FontSize->12, FontWeight->"Bold"], Cell[StyleData["SubsubsectionIcon", "Printout"], ShowGroupOpenCloseIcon->False, CellMargins->{{2, 0}, {0, 18}}, PageBreakBelow->False, FontSize->10] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Text", "Subsubsection"], Cell[CellGroupData[{ Cell[StyleData["Text"], CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, ParagraphSpacing->{0, 8}], Cell[StyleData["Text", "Printout"], CellMargins->{{2, 0}, {0, 8}}] }, Open ]], Cell[CellGroupData[{ Cell[StyleData["CompactText"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, ParagraphSpacing->{0, 0}, StyleMenuListing->None, FontSize->10], Cell[StyleData["CompactText", "Printout"], CellMargins->{{2, 0}, {0, 8}}, FontSize->8] }, Closed]], Cell[StyleData["FunctionName"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, ParagraphSpacing->{0, 0}, FontSize->14, FontWeight->"Bold"], Cell[CellGroupData[{ Cell[StyleData["Compact12Text"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, ParagraphSpacing->{0, 0}, StyleMenuListing->None], Cell[StyleData["Compact12Text", "Printout"], CellMargins->{{2, 0}, {0, 8}}, FontSize->10] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["TextSans"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, ParagraphSpacing->{0, 8}, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->10], Cell[StyleData["TextSans", "Printout"], CellMargins->{{2, 0}, {0, 8}}, FontSize->8] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["ItemizedText"], ShowCellBracket->False, CellMargins->{{20, 4}, {0, 8}}, ParagraphSpacing->{0, 8}, ParagraphIndent->-15, StyleMenuListing->None], Cell[StyleData["ItemizedText", "Printout"], CellMargins->{{12, 0}, {0, 8}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["ItemizedTextNote"], ShowCellBracket->False, CellMargins->{{35, 4}, {0, 4}}, ParagraphSpacing->{0, 8}, StyleMenuListing->None], Cell[StyleData["ItemizedTextNote", "Printout"], CellMargins->{{27, 0}, {0, 4}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["IndentedText"], ShowCellBracket->False, CellMargins->{{20, 4}, {0, 6}}, ParagraphSpacing->{0, 8}, StyleMenuListing->None], Cell[StyleData["IndentedText", "Printout"], CellMargins->{{12, 0}, {0, 6}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["MathCaption"], CellDingbat->"\[FilledSmallSquare]", ShowCellBracket->False, CellMargins->{{19, 62}, {0, 14}}, PageBreakBelow->False, CellFrameLabelMargins->4, LineSpacing->{1, 1}, ParagraphSpacing->{0, 8}, FontColor->RGBColor[0, 0, 0.4]], Cell[StyleData["MathCaption", "Printout"], CellMargins->{{9, 0}, {0, 14}}, FontSize->9, FontColor->GrayLevel[0]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["SmallText"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, LineSpacing->{1, 3}, ParagraphSpacing->{0.7, 0}, CounterIncrements->"SmallText", FontSize->9], Cell[StyleData["SmallText", "Printout"], CellMargins->{{2, 0}, {0, 8}}, TextJustification->1, FontSize->7] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Input/Output", "Subsubsection"], Cell["\<\ The cells in this section define styles used for input and output to the \ kernel. Be careful when modifying, renaming, or removing these styles, \ because the front end associates special meanings with these style names. \ \ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["Input"], CellMargins->{{46, 4}, {3, 8}}, Evaluatable->True, CellGroupingRules->"InputGrouping", PageBreakWithin->False, GroupPageBreakWithin->False, CellLabelAutoDelete->False, CellLabelMargins->{{14, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultInputFormatType, ShowSpecialCharacters->Automatic, FormatType->StandardForm, ShowStringCharacters->True, NumberMarks->True, FontWeight->"Bold"], Cell[StyleData["Input", "Printout"], ShowCellBracket->False, FontSize->9] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Output"], CellMargins->{{47, 4}, {4, 2}}, CellEditDuplicate->True, CellGroupingRules->"OutputGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GroupPageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, CellLabelAutoDelete->False, CellLabelMargins->{{14, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultOutputFormatType, FormatType->StandardForm, Background->RGBColor[0.957046, 0.933608, 0.417975]], Cell[StyleData["Output", "Printout"], ShowCellBracket->False, FontSize->9] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Message"], CellMargins->{{47, 4}, {4, 2}}, CellGroupingRules->"OutputGrouping", PageBreakWithin->False, GroupPageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, ShowCellLabel->False, CellLabelMargins->{{14, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultOutputFormatType, FormatType->InputForm, StyleMenuListing->None, FontColor->RGBColor[0, 0, 1]], Cell[StyleData["Message", "Printout"], ShowCellBracket->False, FontSize->9, FontColor->GrayLevel[0]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Print"], CellMargins->{{47, 4}, {4, 2}}, CellGroupingRules->"OutputGrouping", PageBreakWithin->False, GroupPageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, ShowCellLabel->False, CellLabelMargins->{{14, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultOutputFormatType, FormatType->InputForm, StyleMenuListing->None], Cell[StyleData["Print", "Printout"], ShowCellBracket->False, FontSize->9] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Graphics"], CellMargins->{{47, 4}, {4, 2}}, CellGroupingRules->"GraphicsGrouping", PageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, ShowCellLabel->False, DefaultFormatType->DefaultFormatTypeForOutput, FormatType->InputForm, StyleMenuListing->None, FontWeight->"Plain"], Cell[StyleData["Graphics", "Printout"], ShowCellBracket->False, FontSize->9] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["CellLabel"], StyleMenuListing->None, FontFamily->"Helvetica", FontSize->9, FontWeight->"Plain", FontColor->RGBColor[0, 0, 1]], Cell[StyleData["CellLabel", "Printout"], FontFamily->"Courier", FontSize->7, FontSlant->"Italic", FontColor->GrayLevel[0]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Name"], StyleMenuListing->None, FontFamily->"Helvetica", FontSize->9, FontWeight->"Plain", FontSlant->"Italic", FontColor->RGBColor[0, 0, 1]], Cell[StyleData["Name", "Printout"], FontSize->7, FontColor->GrayLevel[0]] }, Closed]] }, Open ]], Cell[CellGroupData[{ Cell["Hyperlinks", "Subsubsection"], Cell["\<\ The cells below define styles useful for making hypertext ButtonBoxes. The \ \"Hyperlink\" style is for links within the same Notebook, or between \ Notebooks. The others point to the various sections of the help browser. \ These styles will modify individual words or letters in a cell exclusive of \ the cell tag.\ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["Hyperlink"], StyleMenuListing->None, ButtonStyleMenuListing->Automatic, FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`NotebookLocate[ #2]}]&), Active->True, ButtonFrame->"None", ButtonNote->ButtonData}], Cell[StyleData["Hyperlink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["MainBookLink"], StyleMenuListing->None, FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "MainBook", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["MainBookLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["AddOnsLink"], StyleMenuListing->None, FontFamily->"Courier", FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "AddOns", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["AddOnLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["RefGuideLink"], StyleMenuListing->None, FontFamily->"Courier", FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "RefGuideLink", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["RefGuideLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["GettingStartedLink"], StyleMenuListing->None, FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "GettingStarted", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["GettingStartedLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["OtherInformationLink"], StyleMenuListing->None, FontColor->RGBColor[0, 0, 1], FontVariations->{"Underline"->True}, ButtonBoxOptions->{ButtonFunction:>(FrontEndExecute[ { FrontEnd`HelpBrowserLookup[ "OtherInformation", #]}]&), Active->True, ButtonFrame->"None"}], Cell[StyleData["OtherInformationLink", "Printout"], FontColor->GrayLevel[0], FontVariations->{"Underline"->False}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Inline Formatting", "Subsubsection"], Cell["\<\ These styles are for modifying individual words or letters in a cell \ exclusive of the cell tag.\ \>", "Text"], Cell[StyleData["JT"], StyleMenuListing->None, FontFamily->"JFontText"], Cell[StyleData["JS"], StyleMenuListing->None, FontFamily->"JFontSans"], Cell[StyleData["JSB"], StyleMenuListing->None, FontFamily->"JFontSansBold"], Cell[StyleData["RM"], StyleMenuListing->None, FontWeight->"Plain", FontSlant->"Plain"], Cell[StyleData["BF"], StyleMenuListing->None, FontWeight->"Bold"], Cell[StyleData["IT"], StyleMenuListing->None, FontSlant->"Italic"], Cell[StyleData["TR"], StyleMenuListing->None, FontFamily->"Times", FontWeight->"Plain", FontSlant->"Plain"], Cell[StyleData["TI"], StyleMenuListing->None, FontFamily->"Times", FontWeight->"Plain", FontSlant->"Italic"], Cell[StyleData["TB"], StyleMenuListing->None, FontFamily->"Times", FontWeight->"Bold", FontSlant->"Plain"], Cell[StyleData["TBI"], StyleMenuListing->None, FontFamily->"Times", FontWeight->"Bold", FontSlant->"Italic"], Cell[StyleData["MR"], StyleMenuListing->None, FontFamily->"Courier", FontWeight->"Plain", FontSlant->"Plain"], Cell[StyleData["MO"], StyleMenuListing->None, FontFamily->"Courier", FontWeight->"Plain", FontSlant->"Italic"], Cell[StyleData["MB"], StyleMenuListing->None, FontFamily->"Courier", FontWeight->"Bold", FontSlant->"Plain"], Cell[StyleData["MBO"], StyleMenuListing->None, FontFamily->"Courier", FontWeight->"Bold", FontSlant->"Italic"], Cell[StyleData["SR"], StyleMenuListing->None, FontFamily->"Helvetica", FontWeight->"Plain", FontSlant->"Plain"], Cell[StyleData["SO"], StyleMenuListing->None, FontFamily->"Helvetica", FontWeight->"Plain", FontSlant->"Italic"], Cell[StyleData["SB"], StyleMenuListing->None, FontFamily->"Helvetica", FontWeight->"Bold", FontSlant->"Plain"], Cell[StyleData["SBO"], StyleMenuListing->None, FontFamily->"Helvetica", FontWeight->"Bold", FontSlant->"Italic"], Cell[StyleData["M4"], ShowCellBracket->True, StyleMenuListing->None, FontFamily->"Math4", CharacterEncoding->"Math4"], Cell[CellGroupData[{ Cell[StyleData["SO10"], StyleMenuListing->None, FontFamily->"Helvetica", FontSize->10, FontWeight->"Plain", FontSlant->"Italic"], Cell[StyleData["SO10", "Printout"], StyleMenuListing->None, FontFamily->"Helvetica", FontSize->7, FontWeight->"Plain", FontSlant->"Italic"] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["C1"], StyleMenuListing->None, FontColor->RGBColor[0.4, 0, 1]], Cell[StyleData["C1", "Printout"], FontColor->GrayLevel[0]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["C1MR"], StyleMenuListing->None, FontFamily->"Courier", FontColor->RGBColor[0.4, 0, 1]], Cell[StyleData["C1MR", "Printout"], FontColor->GrayLevel[0]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Emphasis Boxes and Pictures", "Subsubsection"], Cell[CellGroupData[{ Cell[StyleData["Box"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnSpacings->1}], Cell[StyleData["Box", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["DoubleBox"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnSpacings->2, RowAlignments->Top}], Cell[StyleData["DoubleBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["1ColumnBox"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnSpacings->1}], Cell[StyleData["1ColumnBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["2ColumnBox"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnWidths->{0.31, 0.62}}], Cell[StyleData["2ColumnBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["2ColumnEvenBox"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnWidths->0.46}], Cell[StyleData["2ColumnEvenBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["2ColumnSmallBox"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnSpacings->1.5, ColumnWidths->0.35, ColumnAlignments->{Right, Left}}], Cell[StyleData["2ColumnSmallBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["3ColumnBox"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnWidths->0.31}], Cell[StyleData["3ColumnBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["3ColumnSmallBox"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnSpacings->1.5, ColumnWidths->0.24, ColumnAlignments->{Right, Center, Left}}], Cell[StyleData["3ColumnSmallBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["4ColumnBox"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnWidths->{0.13, 0.33, 0.13, 0.33}}], Cell[StyleData["4ColumnBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["5ColumnBox"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnWidths->0.194}], Cell[StyleData["5ColumnBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["6ColumnBox"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnWidths->{0.12, 0.22, 0.12, 0.12, 0.22, 0.12}}], Cell[StyleData["6ColumnBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["ItemizedNoteBox"], CellFrame->0.5, ShowCellBracket->False, CellMargins->{{37, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, Background->RGBColor[1, 0.6, 0.6], FrameBoxOptions->{BoxMargins->{{1, 1}, {1.5, 1.5}}}, GridBoxOptions->{ColumnSpacings->1}], Cell[StyleData["ItemizedNoteBox", "Printout"], FontSize->10, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["DefinitionBox"], CellFrame->0.5, ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, AutoIndent->False, AutoSpacing->False, LineIndent->0, FontWeight->"Plain", Background->RGBColor[1, 0.6, 0.6], GridBoxOptions->{RowSpacings->1.5, ColumnSpacings->1, ColumnWidths->{0.3, 0.7}, ColumnAlignments->{Left}}], Cell[StyleData["DefinitionBox", "Printout"], CellMargins->{{2, 4}, {0, 8}}, FontSize->10, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["DefinitionBox3Col"], CellFrame->0.5, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, AutoIndent->False, AutoSpacing->False, LineIndent->0, FontWeight->"Plain", Background->RGBColor[1, 0.6, 0.6], GridBoxOptions->{RowSpacings->1.5, ColumnSpacings->1, ColumnWidths->{0.2, 0.3, 0.5}, ColumnAlignments->{Left}}], Cell[StyleData["DefinitionBox3Col", "Printout"], CellMargins->{{2, 4}, {0, 8}}, FontSize->10, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["DefinitionBox4Col"], CellFrame->0.5, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, AutoIndent->False, AutoSpacing->False, LineIndent->0, FontWeight->"Plain", Background->RGBColor[1, 0.6, 0.6], GridBoxOptions->{RowSpacings->1.5, ColumnSpacings->1, ColumnWidths->{0.15, 0.35, 0.15, 0.35}, ColumnAlignments->{Left}}], Cell[StyleData["DefinitionBox4Col", "Printout"], CellMargins->{{2, 4}, {0, 8}}, FontSize->10, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["DefinitionBox5Col"], CellFrame->0.5, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, AutoIndent->False, AutoSpacing->False, LineIndent->0, FontWeight->"Plain", Background->RGBColor[1, 0.6, 0.6], GridBoxOptions->{RowSpacings->1.5, ColumnSpacings->1, ColumnWidths->0.2, ColumnAlignments->{Left}}], Cell[StyleData["DefinitionBox5Col", "Printout"], CellMargins->{{2, 4}, {0, 8}}, FontSize->10, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["DefinitionBox6Col"], CellFrame->0.5, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, AutoIndent->False, AutoSpacing->False, LineIndent->0, FontWeight->"Plain", Background->RGBColor[1, 0.6, 0.6], GridBoxOptions->{RowSpacings->1.5, ColumnSpacings->1, ColumnWidths->{0.13, 0.24, 0.13, 0.13, 0.24, 0.13}, ColumnAlignments->{Left}}], Cell[StyleData["DefinitionBox6Col", "Printout"], CellMargins->{{2, 4}, {0, 8}}, FontSize->10, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["TopBox"], CellFrame->{{0.5, 0.5}, {0, 0.5}}, ShowCellBracket->False, CellMargins->{{11, 4}, {0, 8}}, CellHorizontalScrolling->True, PageBreakBelow->False, AutoIndent->False, AutoSpacing->False, LineIndent->0, StyleMenuListing->None, FontWeight->"Plain", Background->RGBColor[1, 0.6, 0.6], GridBoxOptions->{RowSpacings->1.5, ColumnSpacings->1, ColumnWidths->{0.31, 0.62}, ColumnAlignments->{Left}}], Cell[StyleData["TopBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["MiddleBox"], CellFrame->{{0.5, 0.5}, {0, 0}}, ShowCellBracket->False, CellMargins->{{11, 4}, {0, -7}}, CellHorizontalScrolling->True, PageBreakBelow->False, AutoIndent->False, AutoSpacing->False, LineIndent->0, StyleMenuListing->None, FontWeight->"Plain", Background->RGBColor[1, 0.6, 0.6], GridBoxOptions->{RowSpacings->1.5, ColumnSpacings->1, ColumnWidths->{0.31, 0.62}, ColumnAlignments->{Left}}], Cell[StyleData["MiddleBox", "Printout"], CellMargins->{{2, 0}, {0, 0}}, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["BottomBox"], CellFrame->{{0.5, 0.5}, {0.5, 0}}, ShowCellBracket->False, CellMargins->{{11, 4}, {0, -7}}, CellHorizontalScrolling->True, PageBreakBelow->False, AutoIndent->False, AutoSpacing->False, LineIndent->0, StyleMenuListing->None, FontWeight->"Plain", Background->RGBColor[1, 0.6, 0.6], GridBoxOptions->{RowSpacings->1.5, ColumnSpacings->1, ColumnWidths->{0.31, 0.62}, ColumnAlignments->{Left}}], Cell[StyleData["BottomBox", "Printout"], CellMargins->{{2, 4}, {0, 0}}, FontSize->10, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["TopSpanBox"], CellFrame->{{0.5, 0.5}, {0, 0.5}}, ShowCellBracket->False, CellMargins->{{11, 4}, {0, 8}}, CellHorizontalScrolling->True, PageBreakBelow->False, AutoIndent->False, AutoSpacing->False, LineIndent->0, StyleMenuListing->None, FontWeight->"Plain", Background->RGBColor[1, 0.6, 0.6], GridBoxOptions->{RowSpacings->1.5, ColumnSpacings->1, ColumnWidths->{0.9, 0.03}, ColumnAlignments->{Left}}], Cell[StyleData["TopSpanBox", "Printout"], CellMargins->{{2, 0}, {0, 8}}, FontSize->10, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["MiddleSpanBox"], CellFrame->{{0.5, 0.5}, {0, 0}}, ShowCellBracket->False, CellMargins->{{11, 4}, {0, 0}}, CellHorizontalScrolling->True, PageBreakBelow->False, AutoIndent->False, AutoSpacing->False, LineIndent->0, StyleMenuListing->None, FontWeight->"Plain", Background->RGBColor[1, 0.6, 0.6], GridBoxOptions->{RowSpacings->1.5, ColumnSpacings->1, ColumnWidths->{0.9, 0.03}, ColumnAlignments->{Left}}], Cell[StyleData["MiddleSpanBox", "Printout"], CellMargins->{{2, 4}, {0, 8}}, FontSize->10, Background->GrayLevel[0.900008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Picture"], ShowCellBracket->False, CellMargins->{{10, Inherited}, {0, 8}}, CellHorizontalScrolling->True, StyleMenuListing->None], Cell[StyleData["Picture", "Printout"], CellMargins->{{2, 0}, {0, 8}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["ItemizedPicture"], ShowCellBracket->False, CellMargins->{{35, 4}, {0, 4}}, CellGroupingRules->"GraphicsGrouping", CellHorizontalScrolling->True, StyleMenuListing->None], Cell[StyleData["ItemizedPicture", "Printout"], CellMargins->{{27, 0}, {0, 4}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["PictureGroup"], CellMargins->{{10, Inherited}, {0, 8}}, CellGroupingRules->"GraphicsGrouping", CellHorizontalScrolling->True, StyleMenuListing->None], Cell[StyleData["PictureGroup", "Printout"], CellMargins->{{2, 0}, {0, 8}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Sound"], CellMargins->{{10, Inherited}, {0, 8}}, StyleMenuListing->None], Cell[StyleData["Sound", "Printout"], CellMargins->{{2, 0}, {0, 8}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Caption"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 3}}, PageBreakAbove->False, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->9], Cell[StyleData["Caption", "Printout"], CellMargins->{{2, 0}, {0, 3}}, FontSize->7] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Tables", "Subsubsection"], Cell[CellGroupData[{ Cell[StyleData["2ColumnTable"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, GridBoxOptions->{ColumnWidths->{0.34, 0.64}, ColumnAlignments->{Left}}], Cell[StyleData["2ColumnTable", "Printout"], CellMargins->{{2, 0}, {0, 8}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["2ColumnEvenTable"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, GridBoxOptions->{ColumnWidths->0.49, ColumnAlignments->{Left}}], Cell[StyleData["2ColumnEvenTable", "Printout"], CellMargins->{{2, 0}, {0, 8}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["3ColumnTable"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, LineIndent->0, StyleMenuListing->None, GridBoxOptions->{ColumnWidths->{0.28, 0.28, 0.43}, ColumnAlignments->{Left}}], Cell[StyleData["3ColumnTable", "Printout"], CellMargins->{{2, 0}, {0, 8}}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Formulas and Programming", "Subsubsection"], Cell[CellGroupData[{ Cell[StyleData["InlineFormula"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, ScriptLevel->1, SingleLetterItalics->True, SpanMaxSize->Infinity, StyleMenuListing->None, GridBoxOptions->{ColumnWidths->Automatic}], Cell[StyleData["InlineFormula", "Printout"], CellMargins->{{2, 0}, {0, 8}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["InlineOutput"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, StyleMenuListing->None, FontFamily->"Courier"], Cell[StyleData["InlineOutput", "Printout"], CellMargins->{{2, 0}, {0, 8}}, FontSize->9.5] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["DisplayFormula"], ShowCellBracket->False, CellMargins->{{42, Inherited}, {Inherited, 10}}, CellHorizontalScrolling->True, ScriptLevel->0, SingleLetterItalics->True, SpanMaxSize->Infinity, StyleMenuListing->None, UnderoverscriptBoxOptions->{LimitsPositioning->True}, GridBoxOptions->{ColumnWidths->Automatic}], Cell[StyleData["DisplayFormula", "Printout"], CellMargins->{{34, Inherited}, {Inherited, 10}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["DisplayMath"], ShowCellBracket->False, CellMargins->{{42, 10}, {7, 7}}, Evaluatable->False, CellGroupingRules->"InputGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GroupPageBreakWithin->False, DefaultFormatType->DefaultInputFormatType, AutoItalicWords->{}, FormatType->InputForm, ShowStringCharacters->True, NumberMarks->True, CounterIncrements->"Input"], Cell[StyleData["DisplayMath", "Printout"], CellMargins->{{39, 0}, {6, 6}}, FontSize->9] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["NumberedEquation"], ShowCellBracket->False, CellMargins->{{42, 10}, {7, 7}}, CellFrameLabels->{{None, Cell[ TextData[ {"(", CounterBox[ "NumberedEquation"], ")"}]]}, {None, None}}, DefaultFormatType->DefaultInputFormatType, CounterIncrements->"NumberedEquation", FormatTypeAutoConvert->False], Cell[StyleData["NumberedEquation", "Printout"], CellMargins->{{34, 55}, {0, 10}}, FontSize->10] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["EquationNumber"], LineSpacing->{1.83, 0}], Cell[StyleData["EquationNumber", "Printout"], LineSpacing->{1.7, 0}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Program"], ShowCellBracket->False, CellMargins->{{16, Inherited}, {Inherited, 10}}, CellHorizontalScrolling->True, StyleMenuListing->None, FontFamily->"Courier"], Cell[StyleData["Program", "Printout"], CellMargins->{{8, Inherited}, {Inherited, 10}}, FontSize->9.5] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Unique Help Browser Styles", "Subsubsection"], Cell[CellGroupData[{ Cell[StyleData["ObjectName"], ShowCellBracket->False, CellMargins->{{10, 4}, {1, 10}}, StyleMenuListing->None, FontFamily->"Courier", FontSize->16, FontWeight->"Bold"], Cell[StyleData["ObjectName", "Printout"], CellMargins->{{2, 0}, {1, 10}}, FontSize->12] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Command"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 14}}, CounterIncrements->"Section", StyleMenuListing->None, FontFamily->"Helvetica", FontSize->16, FontWeight->"Bold"], Cell[StyleData["Command", "Printout"], CellMargins->{{2, 0}, {0, 14}}, PageBreakBelow->False, FontSize->14] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["CharacterName"], CellFrame->{{0, 0}, {0.5, 0.5}}, ShowCellBracket->False, CellMargins->{{10, 4}, {0, 4}}, CellFrameMargins->4, StyleMenuListing->None], Cell[StyleData["CharacterName", "Printout"], CellMargins->{{2, 0}, {0, 4}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Usage"], CellFrame->{{0, 0}, {0.5, 0.5}}, ShowCellBracket->False, CellMargins->{{10, 4}, {0, 4}}, CellFrameMargins->5, ParagraphSpacing->{0, 6}, ParagraphIndent->-10, StyleMenuListing->None], Cell[StyleData["Usage", "Printout"], CellMargins->{{2, 0}, {0, 4}}, FontWeight->"Plain"] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Notes"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 8}}, CellHorizontalScrolling->True, ParagraphSpacing->{0, 6}, ParagraphIndent->-10, StyleMenuListing->None, FontFamily->"Times"], Cell[StyleData["Notes", "Printout"], CellMargins->{{2, 0}, {0, 8}}, FontSize->9] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["NotesList"], ShowCellBracket->False, CellMargins->{{20, 4}, {2, 8}}, CellHorizontalScrolling->True, ScriptLevel->1, SingleLetterItalics->True, StyleMenuListing->None, FontFamily->"Times"], Cell[StyleData["NotesList", "Printout"], CellMargins->{{12, 0}, {2, 8}}, FontSize->9] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["ExampleSection"], CellFrame->{{0, 0}, {0, 0.5}}, ShowCellBracket->False, ShowGroupOpenCloseIcon->True, CellMargins->{{11, 4}, {0, 10}}, CellGroupingRules->{"SectionGrouping", 70}, CellFrameMargins->12, StyleMenuListing->None, FontSize->13, FontWeight->"Bold", FontSlant->"Italic", FontColor->RGBColor[0, 0, 0.4]], Cell[StyleData["ExampleSection", "Printout"], CellMargins->{{3, 0}, {0, 10}}, PageBreakBelow->False, FontSize->9, FontColor->GrayLevel[0]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["ExampleText"], ShowCellBracket->True, CellMargins->{{20, 40}, {0, 18}}, ParagraphSpacing->{0, 6}, StyleMenuListing->None, FontColor->RGBColor[0, 0, 0.4]], Cell[StyleData["ExampleText", "Printout"], CellMargins->{{2, 80}, {0, 8}}, PageBreakBelow->False, FontSize->8, FontColor->GrayLevel[0]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["ExampleSubsection"], ShowCellBracket->True, CellMargins->{{20, 4}, {0, 16}}, CellGroupingRules->{"SectionGrouping", 80}, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->10, FontWeight->"Bold"], Cell[StyleData["ExampleSubsection", "Printout"], CellMargins->{{12, 0}, {0, 16}}, PageBreakBelow->False, FontSize->7] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["LineHead"], CellFrame->{{0, 0}, {0.5, 0}}, ShowCellBracket->False, CellMargins->{{10, 4}, {8, 18}}, CounterIncrements->"Subsection", CounterAssignments->{{"Subsubection", 0}}, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->12, FontWeight->"Bold"], Cell[StyleData["LineHead", "Printout"], CellMargins->{{2, 0}, {8, 18}}, PageBreakBelow->False] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["FlushInput"], ShowCellBracket->False, CellMargins->{{10, 4}, {1, 4}}, Evaluatable->True, CellGroupingRules->"InputGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GroupPageBreakWithin->False, CellLabelAutoDelete->False, CellLabelMargins->{{23, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultInputFormatType, ShowSpecialCharacters->Automatic, FormatType->StandardForm, ShowStringCharacters->True, NumberMarks->True, StyleMenuListing->None, FontWeight->"Bold"], Cell[StyleData["FlushInput", "Printout"], ShowCellBracket->False, CellMargins->{{2, 0}, {1, 4}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["FlushOutput"], ShowCellBracket->False, CellMargins->{{10, Inherited}, {Inherited, Inherited}}, CellEditDuplicate->True, CellGroupingRules->"OutputGrouping", CellHorizontalScrolling->True, PageBreakWithin->False, GroupPageBreakWithin->False, GeneratedCell->True, CellAutoOverwrite->True, CellLabelAutoDelete->False, CellLabelMargins->{{23, Inherited}, {Inherited, Inherited}}, DefaultFormatType->DefaultOutputFormatType, FormatType->StandardForm, StyleMenuListing->None], Cell[StyleData["FlushOutput", "Printout"], ShowCellBracket->False, CellMargins->{{2, Inherited}, {Inherited, Inherited}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["DialogItem"], CellDingbat->"\[EmptyDiamond]", ShowCellBracket->False, CellMargins->{{20, 4}, {0, 12}}, CellGroupingRules->{"SectionGrouping", 70}, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->10, FontWeight->"Bold"], Cell[StyleData["DialogItem", "Printout"], CellMargins->{{12, 0}, {0, 12}}, PageBreakBelow->False, FontSize->8] }, Closed]], Cell[StyleData["GroupDivider"], ShowCellBracket->False, CellMargins->{{10, Inherited}, {Inherited, Inherited}}, CellEditDuplicate->True, CellGroupingRules->{"TitleGrouping", 0}, StyleMenuListing->None], Cell[CellGroupData[{ Cell[StyleData["Highlight"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 18}}, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->12, Background->GrayLevel[0.900008]], Cell[StyleData["Highlight", "Printout"], CellMargins->{{2, 0}, {0, 18}}, LineSpacing->{1, 3}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["UserNotes"], CellFrame->{{2, 0}, {0, 0.25}}, ShowCellBracket->False, CellMargins->{{10, 4}, {0, 4}}, ParagraphIndent->-7, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->10], Cell[StyleData["UserNotes", "Printout"], CellMargins->{{2, 0}, {0, 4}}, LineSpacing->{1, 3}, FontSize->8] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["MoreInfo"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 4}}, ParagraphIndent->-7, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->10, FontColor->GrayLevel[1], Background->RGBColor[0.700008, 0.4, 0.100008]], Cell[StyleData["MoreInfo", "Printout"], CellMargins->{{2, 0}, {0, 4}}, LineSpacing->{1, 3}, FontSize->8] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["UserTips"], CellFrame->{{2, 0}, {0, 0.25}}, ShowCellBracket->False, CellMargins->{{10, 4}, {0, 4}}, ParagraphIndent->-7, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->10, FontColor->GrayLevel[1], Background->RGBColor[0.2, 0.500008, 0.700008]], Cell[StyleData["UserTips", "Printout"], CellMargins->{{2, 0}, {0, 4}}, LineSpacing->{1, 3}, FontSize->8, Background->GrayLevel[0.700008]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Theorem"], CellFrame->{{4, 0}, {0, 0}}, ShowCellBracket->False, CellMargins->{{12, 62}, {0, 14}}, CellFrameMargins->4, CellFrameColor->RGBColor[0, 0, 0.8], LineSpacing->{1, 1}, ParagraphSpacing->{0, 8}], Cell[StyleData["Theorem", "Printout"], CellMargins->{{2, 0}, {0, 14}}, CellFrameMargins->3, CellFrameColor->GrayLevel[0.8], FontSize->9, FontColor->GrayLevel[0]] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Commentary"], CellFrame->{{2, 0}, {0, 0}}, ShowCellBracket->False, CellMargins->{{36, 10}, {7, 7}}, PageBreakBelow->False, CellFrameMargins->8, CellFrameColor->RGBColor[0, 0.2, 1], LineSpacing->{1, 3}, ParagraphSpacing->{0, 8}, FontSlant->"Italic"], Cell[StyleData["Commentary", "Printout"], CellMargins->{{32, 0}, {6, 6}}, CellFrameColor->GrayLevel[0.8], FontSize->10] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Contents and Index", "Subsubsection"], Cell[CellGroupData[{ Cell[StyleData["ContentsTitle"], ShowCellBracket->False, CellMargins->{{10, 4}, {0, 18}}, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->18, FontWeight->"Bold"], Cell[StyleData["ContentsTitle", "Printout"], CellMargins->{{2, 0}, {0, 18}}, PageBreakBelow->False, FontSize->18] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["ContentsSection"], CellDingbat->"\[FilledSquare]", ShowCellBracket->False, CellMargins->{{20, 4}, {3, 18}}, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->12, FontWeight->"Bold"], Cell[StyleData["ContentsSection", "Printout"], CellMargins->{{12, 0}, {3, 18}}, PageBreakBelow->False] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["IndexSection"], CellDingbat->"\[FilledSquare]", ShowCellBracket->False, CellMargins->{{20, 4}, {5, 20}}, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->12, FontWeight->"Bold"], Cell[StyleData["IndexSection", "Printout"], CellMargins->{{12, 0}, {5, 20}}, PageBreakBelow->False] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Contents"], ShowCellBracket->False, CellMargins->{{21, 4}, {0, 8}}, StyleMenuListing->None], Cell[StyleData["Contents", "Printout"], CellMargins->{{13, 0}, {0, 8}}] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["Index"], ShowCellBracket->False, CellMargins->{{21, 4}, {0, 0}}, ParagraphIndent->-48, StyleMenuListing->None], Cell[StyleData["Index", "Printout"], CellMargins->{{13, 0}, {0, 0}}, FontSize->9] }, Closed]], Cell[CellGroupData[{ Cell[StyleData["IndexSubentry"], ShowCellBracket->False, CellMargins->{{36, 4}, {0, 0}}, ParagraphIndent->-48, StyleMenuListing->None], Cell[StyleData["IndexSubentry", "Printout"], CellMargins->{{24, 0}, {0, 0}}, FontSize->9] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Horizontal Lines", "Subsubsection"], Cell[CellGroupData[{ Cell[StyleData["Line1"], CellFrame->{{0, 0}, {0, 0.5}}, ShowCellBracket->False, CellMargins->{{10, 4}, {-16, 9}}, StyleMenuListing->None, FontSize->2], Cell[StyleData["Line1", "Printout"], CellMargins->{{2, 0}, {-16, 9}}] }, Closed]], Cell["\<\ The item above is horizontal 0.5 pt line\ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["ProgramTop"], CellFrame->{{0.5, 0.5}, {0, 0.5}}, ShowCellBracket->False, CellMargins->{{10, 4}, {-18, 18}}, LineSpacing->{1, -4}, StyleMenuListing->None, FontSize->4], Cell[StyleData["ProgramTop", "Printout"], CellMargins->{{2, 0}, {-18, 18}}] }, Closed]], Cell["\<\ The item above is a ProgramTop line \ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["ProgramBottom"], CellFrame->{{0.5, 0.5}, {0.5, 0}}, ShowCellBracket->False, CellMargins->{{10, 4}, {-10, -2}}, LineSpacing->{1, -4}, StyleMenuListing->None, FontSize->4], Cell[StyleData["ProgramBottom", "Printout"], CellMargins->{{2, 0}, {-10, -2}}] }, Closed]], Cell["\<\ The item above is a ProgramBottom line \ \>", "Text"], Cell[CellGroupData[{ Cell[StyleData["SessionLabel"], CellFrame->{{0.5, 0}, {0, 0.5}}, ShowCellBracket->False, CellMargins->{{10, 4}, {-4, 18}}, LineSpacing->{1, -3}, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->9], Cell[StyleData["SessionLabel", "Printout"], CellMargins->{{2, 0}, {-4, 18}}, FontSize->7] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Page Headers and Footers", "Subsubsection"], Cell[StyleData["PageHeader", "Printout"], CellMargins->{{0, 0}, {2, 0}}, StyleMenuListing->None, FontSize->9, FontSlant->"Italic"], Cell[StyleData["PageNumber", "Printout"], CellMargins->{{0, 0}, {2, 0}}, StyleMenuListing->None, FontFamily->"Helvetica", FontSize->9, FontWeight->"Bold"], Cell[StyleData["PageFooter", "Printout"], StyleMenuListing->None, FontFamily->"Helvetica", FontSize->9] }, Open ]] }, Open ]] }] ] (******************************************************************* 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->{ "Dbg_2000_2_16_12_44_31_3"->{ Cell[7752, 221, 1146, 35, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_3"], Cell[8901, 258, 1337, 42, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_3"]}, "Dbg_2000_2_16_12_44_31_4"->{ Cell[10241, 302, 1032, 32, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_4"], Cell[11276, 336, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_4"]}, "Dbg_2000_2_16_12_44_31_5"->{ Cell[12208, 367, 961, 30, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_5"], Cell[13172, 399, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_5"]}, "Dbg_2000_2_16_12_44_31_6"->{ Cell[14104, 430, 962, 30, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_6"], Cell[15069, 462, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_6"]}, "Dbg_2000_2_16_12_44_31_7"->{ Cell[16001, 493, 1116, 34, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_7"], Cell[17194, 532, 933, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_7"]}, "Info"->{ Cell[18130, 563, 229, 6, 56, "Print", CellTags->"Info"], Cell[18362, 571, 266, 9, 56, "Print", CellTags->"Info"], Cell[30703, 973, 297, 9, 56, "Print", CellTags->"Info"], Cell[31003, 984, 334, 12, 56, "Print", CellTags->"Info"], Cell[52804, 1706, 265, 9, 56, "Print", CellTags->"Info"], Cell[63973, 1997, 539, 19, 58, "Print", CellTags->"Info"], Cell[70910, 2228, 523, 18, 58, "Print", CellTags->"Info"], Cell[76175, 2406, 265, 9, 56, "Print", CellTags->"Info"], Cell[78632, 2481, 817, 25, 56, "Print", CellTags->"Info"], Cell[79452, 2508, 816, 25, 56, "Print", CellTags->"Info"], Cell[91669, 2912, 245, 7, 56, "Print", CellTags->"Info"], Cell[91917, 2921, 819, 25, 56, "Print", CellTags->"Info"], Cell[92739, 2948, 818, 25, 56, "Print", CellTags->"Info"], Cell[93560, 2975, 282, 10, 56, "Print", CellTags->"Info"], Cell[99528, 3174, 281, 10, 56, "Print", CellTags->"Info"], Cell[112135, 3589, 245, 7, 56, "Print", CellTags->"Info"], Cell[112493, 3603, 282, 10, 56, "Print", CellTags->"Info"], Cell[126904, 4024, 204, 6, 56, "Print", CellTags->"Info"], Cell[130602, 4140, 341, 12, 56, "Print", CellTags->"Info"], Cell[130946, 4154, 363, 13, 72, "Print", CellTags->"Info"], Cell[131312, 4169, 363, 13, 72, "Print", CellTags->"Info"], Cell[131678, 4184, 371, 13, 56, "Print", CellTags->"Info"], Cell[132052, 4199, 371, 13, 56, "Print", CellTags->"Info"], Cell[132426, 4214, 333, 12, 56, "Print", CellTags->"Info"], Cell[147787, 4699, 333, 12, 56, "Print", CellTags->"Info"]}, "Dbg$179"->{ Cell[25674, 798, 1107, 37, 59, "Print", CellTags->"Dbg$179"]}, "Dbg$188"->{ Cell[26784, 837, 949, 31, 59, "Print", CellTags->"Dbg$188"], Cell[29755, 940, 945, 31, 59, "Print", CellTags->"Dbg$188"]}, "Dbg$197"->{ Cell[27736, 870, 1097, 36, 59, "Print", CellTags->"Dbg$197"], Cell[28836, 908, 916, 30, 59, "Print", CellTags->"Dbg$197"]}, "Dbg_2000_2_16_12_55_38_40"->{ Cell[32574, 1034, 1147, 35, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_40"], Cell[33724, 1071, 1338, 42, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_40"]}, "Dbg_2000_2_16_12_55_38_41"->{ Cell[35065, 1115, 1034, 32, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_41"], Cell[36102, 1149, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_41"]}, "Dbg_2000_2_16_12_55_38_42"->{ Cell[37036, 1180, 964, 30, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_42"], Cell[38003, 1212, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_42"]}, "Dbg_2000_2_16_12_55_38_43"->{ Cell[38937, 1243, 965, 30, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_43"], Cell[39905, 1275, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_43"]}, "Dbg_2000_2_16_12_55_38_44"->{ Cell[40839, 1306, 1118, 34, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_44"], Cell[42035, 1345, 935, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_44"]}, "Dbg_2000_2_16_12_55_38_45"->{ Cell[42973, 1376, 1123, 36, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_45"]}, "Dbg_2000_2_16_12_55_38_46"->{ Cell[44099, 1414, 965, 30, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_46"]}, "Dbg_2000_2_16_16_16_41_18"->{ Cell[45916, 1479, 1077, 33, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_18"]}, "Dbg_2000_2_16_16_16_41_19"->{ Cell[46996, 1514, 999, 31, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_19"], Cell[47998, 1547, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_19"]}, "Dbg_2000_2_16_16_16_41_20"->{ Cell[48932, 1578, 999, 31, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_20"], Cell[49934, 1611, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_20"]}, "Dbg_2000_2_16_16_16_41_21"->{ Cell[50868, 1642, 999, 31, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_21"], Cell[51870, 1675, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_21"]}, "Dbg_2000_2_16_15_42_2_5978"->{ Cell[65906, 2064, 1466, 44, 64, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5978"], Cell[74282, 2343, 958, 30, 59, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5978"], Cell[75243, 2375, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5978"]}, "Dbg_2000_2_16_15_42_2_5979"->{ Cell[67375, 2110, 1216, 39, 59, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[68594, 2151, 1171, 37, 64, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[71436, 2248, 952, 30, 62, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[72391, 2280, 952, 30, 62, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[73346, 2312, 933, 29, 59, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5979"]}, "Dbg_2000_2_16_15_42_2_5980"->{ Cell[69768, 2190, 1139, 36, 61, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5980"]}, "Dbg_2000_2_9_15_14_24_129"->{ Cell[80866, 2562, 1091, 35, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_129"]}, "Dbg_2000_2_9_15_14_24_130"->{ Cell[81960, 2599, 933, 29, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_130"], Cell[84883, 2696, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_130"], Cell[85815, 2727, 903, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_130"]}, "Dbg_2000_2_9_15_14_24_131"->{ Cell[82896, 2630, 1081, 34, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_131"], Cell[83980, 2666, 900, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_131"]}, "Dbg_2000_2_9_15_14_24_132"->{ Cell[86721, 2757, 1508, 43, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_132"]}, "Dbg_2000_2_9_15_14_24_133"->{ Cell[88232, 2802, 1446, 42, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_133"]}, "Dbg_2000_2_9_15_14_24_134"->{ Cell[89681, 2846, 1082, 34, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_134"], Cell[90766, 2882, 900, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_134"]}, "Dbg_2000_2_9_16_5_58_45"->{ Cell[95747, 3048, 933, 29, 59, "Print", CellTags->"Dbg_2000_2_9_16_5_58_45"], Cell[98528, 3140, 997, 32, 59, "Print", CellTags->"Dbg_2000_2_9_16_5_58_45"]}, "Dbg_2000_2_9_16_5_58_46"->{ Cell[96683, 3079, 941, 29, 59, "Print", CellTags->"Dbg_2000_2_9_16_5_58_46"], Cell[97627, 3110, 898, 28, 59, "Print", CellTags->"Dbg_2000_2_9_16_5_58_46"]}, "Dbg_2000_2_9_15_30_25_7"->{ Cell[101906, 3250, 1112, 34, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_7"], Cell[103021, 3286, 1436, 45, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_7"]}, "Dbg_2000_2_9_15_30_25_8"->{ Cell[104460, 3333, 1107, 35, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_8"], Cell[106574, 3404, 998, 31, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_8"], Cell[107575, 3437, 895, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_8"]}, "Dbg_2000_2_9_15_30_25_9"->{ Cell[105570, 3370, 1001, 32, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_9"]}, "Dbg_2000_2_9_15_30_25_10"->{ Cell[108473, 3467, 928, 29, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_10"], Cell[109404, 3498, 896, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_10"]}, "Dbg_2000_2_9_15_30_25_11"->{ Cell[110303, 3528, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_11"], Cell[111235, 3559, 897, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_11"]}, "Colour restrictions"->{ Cell[112875, 3623, 578, 11, 104, "Text", CellTags->"Colour restrictions"]}, "Breakpoint"->{ Cell[115869, 3700, 89, 1, 27, "SubsubsectionIcon", CellTags->"Breakpoint"]}, "Dbg_2000_2_16_14_10_17_3"->{ Cell[120948, 3825, 1116, 36, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_3"]}, "Dbg_2000_2_16_14_10_17_4"->{ Cell[122067, 3863, 970, 30, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_4"], Cell[123102, 3898, 932, 29, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_4"]}, "Dbg_2000_2_16_14_10_17_5"->{ Cell[124037, 3929, 961, 30, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_5"], Cell[125001, 3961, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_5"]}, "Dbg_2000_2_16_14_10_17_6"->{ Cell[125933, 3992, 968, 30, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_6"]}, "Dbg$494"->{ Cell[139200, 4405, 918, 29, 59, "Print", CellTags->"Dbg$494"], Cell[140121, 4436, 1018, 32, 59, "Print", CellTags->"Dbg$494"], Cell[145894, 4635, 973, 31, 72, "Print", CellTags->"Dbg$494"], Cell[146870, 4668, 914, 29, 72, "Print", CellTags->"Dbg$494"]}, "Dbg$514"->{ Cell[141142, 4470, 949, 31, 59, "Print", CellTags->"Dbg$514"]}, "Dbg$546"->{ Cell[142094, 4503, 980, 32, 59, "Print", CellTags->"Dbg$546"], Cell[144942, 4602, 949, 31, 59, "Print", CellTags->"Dbg$546"]}, "Dbg$555"->{ Cell[143077, 4537, 944, 31, 59, "Print", CellTags->"Dbg$555"], Cell[144024, 4570, 915, 30, 59, "Print", CellTags->"Dbg$555"]}, "Future"->{ Cell[157641, 5069, 70, 1, 27, "SubsubsectionIcon", CellTags->"Future"]} } *) (*CellTagsIndex CellTagsIndex->{ {"Dbg_2000_2_16_12_44_31_3", 210324, 7083}, {"Dbg_2000_2_16_12_44_31_4", 210533, 7088}, {"Dbg_2000_2_16_12_44_31_5", 210743, 7093}, {"Dbg_2000_2_16_12_44_31_6", 210952, 7098}, {"Dbg_2000_2_16_12_44_31_7", 211161, 7103}, {"Info", 211351, 7108}, {"Dbg$179", 213090, 7159}, {"Dbg$188", 213178, 7162}, {"Dbg$197", 213336, 7167}, {"Dbg_2000_2_16_12_55_38_40", 213513, 7172}, {"Dbg_2000_2_16_12_55_38_41", 213729, 7177}, {"Dbg_2000_2_16_12_55_38_42", 213944, 7182}, {"Dbg_2000_2_16_12_55_38_43", 214158, 7187}, {"Dbg_2000_2_16_12_55_38_44", 214372, 7192}, {"Dbg_2000_2_16_12_55_38_45", 214587, 7197}, {"Dbg_2000_2_16_12_55_38_46", 214712, 7200}, {"Dbg_2000_2_16_16_16_41_18", 214836, 7203}, {"Dbg_2000_2_16_16_16_41_19", 214961, 7206}, {"Dbg_2000_2_16_16_16_41_20", 215175, 7211}, {"Dbg_2000_2_16_16_16_41_21", 215389, 7216}, {"Dbg_2000_2_16_15_42_2_5978", 215604, 7221}, {"Dbg_2000_2_16_15_42_2_5979", 215913, 7228}, {"Dbg_2000_2_16_15_42_2_5980", 216405, 7239}, {"Dbg_2000_2_9_15_14_24_129", 216531, 7242}, {"Dbg_2000_2_9_15_14_24_130", 216656, 7245}, {"Dbg_2000_2_9_15_14_24_131", 216960, 7252}, {"Dbg_2000_2_9_15_14_24_132", 217175, 7257}, {"Dbg_2000_2_9_15_14_24_133", 217300, 7260}, {"Dbg_2000_2_9_15_14_24_134", 217425, 7263}, {"Dbg_2000_2_9_16_5_58_45", 217638, 7268}, {"Dbg_2000_2_9_16_5_58_46", 217846, 7273}, {"Dbg_2000_2_9_15_30_25_7", 218054, 7278}, {"Dbg_2000_2_9_15_30_25_8", 218266, 7283}, {"Dbg_2000_2_9_15_30_25_9", 218566, 7290}, {"Dbg_2000_2_9_15_30_25_10", 218689, 7293}, {"Dbg_2000_2_9_15_30_25_11", 218902, 7298}, {"Colour restrictions", 219110, 7303}, {"Breakpoint", 219214, 7306}, {"Dbg_2000_2_16_14_10_17_3", 219333, 7309}, {"Dbg_2000_2_16_14_10_17_4", 219457, 7312}, {"Dbg_2000_2_16_14_10_17_5", 219670, 7317}, {"Dbg_2000_2_16_14_10_17_6", 219883, 7322}, {"Dbg$494", 219989, 7325}, {"Dbg$514", 220298, 7334}, {"Dbg$546", 220387, 7337}, {"Dbg$555", 220549, 7342}, {"Future", 220710, 7347} } *) (*NotebookFileOutline Notebook[{ Cell[1705, 50, 106, 1, 87, "Chapter"], Cell[1814, 53, 327, 10, 89, "Input"], Cell[CellGroupData[{ Cell[2166, 67, 67, 1, 35, "SubsubsectionIcon"], Cell[2236, 70, 805, 16, 169, "Text"], Cell[3044, 88, 443, 10, 99, "Text"], Cell[3490, 100, 1471, 33, 248, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[4998, 138, 97, 2, 27, "SubsubsectionIcon"], Cell[5098, 142, 167, 3, 56, "Text"], Cell[5268, 147, 318, 7, 60, "Text"], Cell[5589, 156, 1232, 29, 222, "Input"], Cell[6824, 187, 132, 4, 38, "Text"], Cell[6959, 193, 65, 1, 40, "Input"], Cell[7027, 196, 332, 8, 56, "Text"], Cell[7362, 206, 50, 0, 34, "Text"], Cell[CellGroupData[{ Cell[7437, 210, 312, 9, 40, "Input"], Cell[7752, 221, 1146, 35, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_3"], Cell[8901, 258, 1337, 42, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_3"], Cell[10241, 302, 1032, 32, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_4"], Cell[11276, 336, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_4"], Cell[12208, 367, 961, 30, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_5"], Cell[13172, 399, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_5"], Cell[14104, 430, 962, 30, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_6"], Cell[15069, 462, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_6"], Cell[16001, 493, 1116, 34, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_7"], Cell[17120, 529, 71, 1, 32, "Print"], Cell[17194, 532, 933, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_44_31_7"], Cell[18130, 563, 229, 6, 56, "Print", CellTags->"Info"], Cell[18362, 571, 266, 9, 56, "Print", CellTags->"Info"], Cell[18631, 582, 53, 1, 56, "Output"] }, Open ]], Cell[18699, 586, 2866, 48, 492, "Text"], Cell[CellGroupData[{ Cell[21590, 638, 122, 3, 40, "Input"], Cell[21715, 643, 115, 3, 32, "Print"], Cell[21833, 648, 359, 13, 32, "Print"], Cell[22195, 663, 115, 3, 32, "Print"], Cell[22313, 668, 305, 11, 32, "Print"], Cell[22621, 681, 115, 3, 32, "Print"], Cell[22739, 686, 305, 11, 32, "Print"], Cell[23047, 699, 115, 3, 32, "Print"], Cell[23165, 704, 334, 11, 32, "Print"], Cell[23502, 717, 121, 3, 56, "Output"] }, Open ]], Cell[23638, 723, 195, 4, 38, "Text"], Cell[CellGroupData[{ Cell[23858, 731, 158, 4, 40, "Input"], Cell[24019, 737, 115, 3, 32, "Print"], Cell[24137, 742, 359, 13, 32, "Print"], Cell[24499, 757, 121, 3, 56, "Output"] }, Open ]], Cell[24635, 763, 189, 5, 38, "Text"], Cell[24827, 770, 257, 5, 60, "Text"], Cell[CellGroupData[{ Cell[25109, 779, 436, 12, 40, "Input"], Cell[25548, 793, 123, 3, 32, "Print"], Cell[25674, 798, 1107, 37, 59, "Print", CellTags->"Dbg$179"], Cell[26784, 837, 949, 31, 59, "Print", CellTags->"Dbg$188"], Cell[27736, 870, 1097, 36, 59, "Print", CellTags->"Dbg$197"], Cell[28836, 908, 916, 30, 59, "Print", CellTags->"Dbg$197"], Cell[29755, 940, 945, 31, 59, "Print", CellTags->"Dbg$188"], Cell[30703, 973, 297, 9, 56, "Print", CellTags->"Info"], Cell[31003, 984, 334, 12, 56, "Print", CellTags->"Info"], Cell[31340, 998, 105, 3, 56, "Output"] }, Open ]], Cell[31460, 1004, 727, 14, 126, "Text"], Cell[CellGroupData[{ Cell[32212, 1022, 359, 10, 40, "Input"], Cell[32574, 1034, 1147, 35, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_40"], Cell[33724, 1071, 1338, 42, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_40"], Cell[35065, 1115, 1034, 32, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_41"], Cell[36102, 1149, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_41"], Cell[37036, 1180, 964, 30, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_42"], Cell[38003, 1212, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_42"], Cell[38937, 1243, 965, 30, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_43"], Cell[39905, 1275, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_43"], Cell[40839, 1306, 1118, 34, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_44"], Cell[41960, 1342, 72, 1, 32, "Print"], Cell[42035, 1345, 935, 29, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_44"], Cell[42973, 1376, 1123, 36, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_45"], Cell[44099, 1414, 965, 30, 59, "Print", CellTags->"Dbg_2000_2_16_12_55_38_46"] }, Open ]], Cell[CellGroupData[{ Cell[45101, 1449, 65, 1, 40, "Input"], Cell[45169, 1452, 62, 1, 56, "Output"] }, Open ]], Cell[45246, 1456, 389, 9, 64, "Text"], Cell[CellGroupData[{ Cell[45660, 1469, 253, 8, 40, "Input"], Cell[45916, 1479, 1077, 33, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_18"], Cell[46996, 1514, 999, 31, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_19"], Cell[47998, 1547, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_19"], Cell[48932, 1578, 999, 31, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_20"], Cell[49934, 1611, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_20"], Cell[50868, 1642, 999, 31, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_21"], Cell[51870, 1675, 931, 29, 59, "Print", CellTags->"Dbg_2000_2_16_16_16_41_21"], Cell[52804, 1706, 265, 9, 56, "Print", CellTags->"Info"], Cell[53072, 1717, 114, 3, 56, "Output"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[53235, 1726, 57, 0, 27, "SubsubsectionIcon"], Cell[53295, 1728, 522, 11, 86, "Text"], Cell[53820, 1741, 139, 3, 40, "Input"], Cell[53962, 1746, 331, 11, 72, "Text"], Cell[54296, 1759, 6527, 157, 812, "Text"], Cell[60826, 1918, 1293, 23, 266, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[62156, 1946, 50, 0, 35, "SubsubsectionIcon"], Cell[62209, 1948, 985, 21, 130, "Text"], Cell[63197, 1971, 203, 4, 56, "Text"], Cell[CellGroupData[{ Cell[63425, 1979, 545, 16, 40, "Input"], Cell[63973, 1997, 539, 19, 58, "Print", CellTags->"Info"], Cell[64515, 2018, 80, 5, 53, "Output"] }, Open ]], Cell[64610, 2026, 581, 13, 90, "Text"], Cell[CellGroupData[{ Cell[65216, 2043, 687, 19, 40, "Input"], Cell[65906, 2064, 1466, 44, 64, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5978"], Cell[67375, 2110, 1216, 39, 59, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[68594, 2151, 1171, 37, 64, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[69768, 2190, 1139, 36, 61, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5980"], Cell[70910, 2228, 523, 18, 58, "Print", CellTags->"Info"], Cell[71436, 2248, 952, 30, 62, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[72391, 2280, 952, 30, 62, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[73346, 2312, 933, 29, 59, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5979"], Cell[74282, 2343, 958, 30, 59, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5978"], Cell[75243, 2375, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_16_15_42_2_5978"], Cell[76175, 2406, 265, 9, 56, "Print", CellTags->"Info"], Cell[76443, 2417, 52, 1, 56, "Output"] }, Open ]], Cell[76510, 2421, 291, 5, 56, "Text"], Cell[76804, 2428, 1390, 32, 222, "Input"], Cell[78197, 2462, 105, 3, 34, "Text"], Cell[CellGroupData[{ Cell[78327, 2469, 245, 7, 40, "Input"], Cell[78575, 2478, 54, 1, 31, "Print"], Cell[78632, 2481, 817, 25, 56, "Print", CellTags->"Info"], Cell[79452, 2508, 816, 25, 56, "Print", CellTags->"Info"], Cell[80271, 2535, 82, 5, 53, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[80390, 2545, 362, 10, 40, "Input"], Cell[80755, 2557, 108, 3, 55, "Print"], Cell[80866, 2562, 1091, 35, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_129"], Cell[81960, 2599, 933, 29, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_130"], Cell[82896, 2630, 1081, 34, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_131"], Cell[83980, 2666, 900, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_131"], Cell[84883, 2696, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_130"], Cell[85815, 2727, 903, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_130"], Cell[86721, 2757, 1508, 43, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_132"], Cell[88232, 2802, 1446, 42, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_133"], Cell[89681, 2846, 1082, 34, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_134"], Cell[90766, 2882, 900, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_14_24_134"], Cell[91669, 2912, 245, 7, 56, "Print", CellTags->"Info"], Cell[91917, 2921, 819, 25, 56, "Print", CellTags->"Info"], Cell[92739, 2948, 818, 25, 56, "Print", CellTags->"Info"], Cell[93560, 2975, 282, 10, 56, "Print", CellTags->"Info"], Cell[93845, 2987, 83, 5, 53, "Output"] }, Open ]], Cell[93943, 2995, 337, 7, 82, "Text"], Cell[94283, 3004, 580, 10, 104, "Text"], Cell[94866, 3016, 188, 4, 56, "Text"], Cell[95057, 3022, 519, 16, 92, "Input"], Cell[CellGroupData[{ Cell[95601, 3042, 143, 4, 40, "Input"], Cell[95747, 3048, 933, 29, 59, "Print", CellTags->"Dbg_2000_2_9_16_5_58_45"], Cell[96683, 3079, 941, 29, 59, "Print", CellTags->"Dbg_2000_2_9_16_5_58_46"], Cell[97627, 3110, 898, 28, 59, "Print", CellTags->"Dbg_2000_2_9_16_5_58_46"], Cell[98528, 3140, 997, 32, 59, "Print", CellTags->"Dbg_2000_2_9_16_5_58_45"], Cell[99528, 3174, 281, 10, 56, "Print", CellTags->"Info"], Cell[99812, 3186, 86, 5, 53, "Output"] }, Open ]], Cell[99913, 3194, 277, 6, 60, "Text"], Cell[100193, 3202, 1373, 33, 222, "Input"], Cell[CellGroupData[{ Cell[101591, 3239, 312, 9, 40, "Input"], Cell[101906, 3250, 1112, 34, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_7"], Cell[103021, 3286, 1436, 45, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_7"], Cell[104460, 3333, 1107, 35, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_8"], Cell[105570, 3370, 1001, 32, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_9"], Cell[106574, 3404, 998, 31, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_8"], Cell[107575, 3437, 895, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_8"], Cell[108473, 3467, 928, 29, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_10"], Cell[109404, 3498, 896, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_10"], Cell[110303, 3528, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_11"], Cell[111235, 3559, 897, 28, 59, "Print", CellTags->"Dbg_2000_2_9_15_30_25_11"], Cell[112135, 3589, 245, 7, 56, "Print", CellTags->"Info"], Cell[112383, 3598, 107, 3, 55, "Print"], Cell[112493, 3603, 282, 10, 56, "Print", CellTags->"Info"], Cell[112778, 3615, 82, 5, 53, "Output"] }, Open ]], Cell[112875, 3623, 578, 11, 104, "Text", CellTags->"Colour restrictions"], Cell[113456, 3636, 146, 4, 40, "Input"], Cell[113605, 3642, 276, 8, 60, "Text"], Cell[113884, 3652, 777, 14, 134, "Text"], Cell[114664, 3668, 1168, 27, 157, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[115869, 3700, 89, 1, 27, "SubsubsectionIcon", CellTags->"Breakpoint"], Cell[115961, 3703, 3225, 78, 447, "Text"], Cell[119189, 3783, 1281, 24, 239, "Text"], Cell[CellGroupData[{ Cell[120495, 3811, 450, 12, 40, "Input"], Cell[120948, 3825, 1116, 36, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_3"], Cell[122067, 3863, 970, 30, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_4"], Cell[123040, 3895, 59, 1, 32, "Print"], Cell[123102, 3898, 932, 29, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_4"], Cell[124037, 3929, 961, 30, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_5"], Cell[125001, 3961, 929, 29, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_5"], Cell[125933, 3992, 968, 30, 59, "Print", CellTags->"Dbg_2000_2_16_14_10_17_6"], Cell[126904, 4024, 204, 6, 56, "Print", CellTags->"Info"] }, Open ]], Cell[CellGroupData[{ Cell[127145, 4035, 63, 1, 40, "Input"], Cell[127211, 4038, 61, 1, 56, "Output"] }, Open ]], Cell[127287, 4042, 699, 16, 124, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[128023, 4063, 52, 0, 27, "SubsubsectionIcon"], Cell[128078, 4065, 1160, 25, 187, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[129275, 4095, 65, 0, 27, "SubsubsectionIcon"], Cell[129343, 4097, 459, 11, 82, "Text"], Cell[129805, 4110, 313, 9, 66, "Input"], Cell[CellGroupData[{ Cell[130143, 4123, 189, 5, 40, "Input"], Cell[130335, 4130, 264, 8, 48, "Message"], Cell[130602, 4140, 341, 12, 56, "Print", CellTags->"Info"], Cell[130946, 4154, 363, 13, 72, "Print", CellTags->"Info"], Cell[131312, 4169, 363, 13, 72, "Print", CellTags->"Info"], Cell[131678, 4184, 371, 13, 56, "Print", CellTags->"Info"], Cell[132052, 4199, 371, 13, 56, "Print", CellTags->"Info"], Cell[132426, 4214, 333, 12, 56, "Print", CellTags->"Info"], Cell[132762, 4228, 112, 3, 56, "Output"] }, Open ]], Cell[132889, 4234, 209, 4, 56, "Text"], Cell[133101, 4240, 582, 11, 100, "Text"], Cell[CellGroupData[{ Cell[133708, 4255, 202, 6, 40, "Input"], Cell[133913, 4263, 269, 8, 32, "Message"], Cell[134185, 4273, 198, 6, 56, "Output"] }, Open ]], Cell[134398, 4282, 829, 15, 148, "Text"], Cell[135230, 4299, 1819, 35, 325, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[137086, 4339, 56, 0, 27, "SubsubsectionIcon"], Cell[137145, 4341, 863, 20, 138, "Text"], Cell[138011, 4363, 82, 2, 34, "Text"], Cell[138096, 4367, 714, 22, 66, "Input"], Cell[138813, 4391, 166, 3, 34, "Text"], Cell[CellGroupData[{ Cell[139004, 4398, 193, 5, 40, "Input"], Cell[139200, 4405, 918, 29, 59, "Print", CellTags->"Dbg$494"], Cell[140121, 4436, 1018, 32, 59, "Print", CellTags->"Dbg$494"], Cell[141142, 4470, 949, 31, 59, "Print", CellTags->"Dbg$514"], Cell[142094, 4503, 980, 32, 59, "Print", CellTags->"Dbg$546"], Cell[143077, 4537, 944, 31, 59, "Print", CellTags->"Dbg$555"], Cell[144024, 4570, 915, 30, 59, "Print", CellTags->"Dbg$555"], Cell[144942, 4602, 949, 31, 59, "Print", CellTags->"Dbg$546"], Cell[145894, 4635, 973, 31, 72, "Print", CellTags->"Dbg$494"], Cell[146870, 4668, 914, 29, 72, "Print", CellTags->"Dbg$494"], Cell[147787, 4699, 333, 12, 56, "Print", CellTags->"Info"], Cell[148123, 4713, 131, 4, 72, "Output"] }, Open ]], Cell[148269, 4720, 136, 4, 38, "Text"], Cell[CellGroupData[{ Cell[148430, 4728, 230, 6, 40, "Input"], Cell[148663, 4736, 116, 3, 32, "Print"], Cell[148782, 4741, 352, 13, 32, "Print"], Cell[149137, 4756, 116, 3, 32, "Print"], Cell[149256, 4761, 302, 11, 32, "Print"], Cell[149561, 4774, 116, 3, 32, "Print"], Cell[149680, 4779, 302, 11, 32, "Print"], Cell[149985, 4792, 116, 3, 32, "Print"], Cell[150104, 4797, 524, 19, 32, "Print"], Cell[150631, 4818, 116, 3, 32, "Print"], Cell[150750, 4823, 308, 11, 32, "Print"], Cell[151061, 4836, 116, 3, 32, "Print"], Cell[151180, 4841, 353, 13, 32, "Print"], Cell[151536, 4856, 116, 3, 32, "Print"], Cell[151655, 4861, 356, 13, 48, "Print"], Cell[152014, 4876, 116, 3, 32, "Print"], Cell[152133, 4881, 410, 15, 32, "Print"], Cell[152546, 4898, 116, 3, 32, "Print"], Cell[152665, 4903, 360, 13, 48, "Print"], Cell[153028, 4918, 116, 3, 32, "Print"], Cell[153147, 4923, 473, 17, 48, "Print"], Cell[153623, 4942, 116, 3, 32, "Print"], Cell[153742, 4947, 361, 13, 48, "Print"], Cell[154106, 4962, 116, 3, 32, "Print"], Cell[154225, 4967, 316, 11, 32, "Print"], Cell[154544, 4980, 116, 3, 32, "Print"], Cell[154663, 4985, 306, 11, 32, "Print"], Cell[154972, 4998, 116, 3, 32, "Print"], Cell[155091, 5003, 304, 11, 32, "Print"], Cell[155398, 5016, 131, 4, 72, "Output"] }, Open ]], Cell[155544, 5023, 998, 20, 187, "Text"], Cell[156545, 5045, 1059, 19, 186, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[157641, 5069, 70, 1, 27, "SubsubsectionIcon", CellTags->"Future"], Cell[157714, 5072, 1654, 33, 330, "Text"] }, Closed]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)