Re: Inconsistent evaluation

*To*: mathgroup at smc.vnet.net*Subject*: [mg61925] Re: Inconsistent evaluation*From*: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>*Date*: Sat, 5 Nov 2005 01:52:08 -0500 (EST)*Organization*: Uni Leipzig*References*: <dkfcjb$eo5$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Hi, how can we "reproduce" the problem on our own machines ? how can we see what your initial cell does ? In general you should set up a different cell for Get[] and Needs[] to be sure, that the variables in the packages are parsed and added to the symbol table first. And than make a second cell with you own definitions. This was a problem with an older Mathematica version, that the parser scan the cell before the kernel evaluate it and so the parser create the symbols before it got the definition for it from the evaluation of Get[]/Needs[] Regards Jens "leigh pascoe" <leigh at cephb.fr> schrieb im Newsbeitrag news:dkfcjb$eo5$1 at smc.vnet.net... | Dear Mathgroup, | | I tried to post this question a few days ago, but it didn't appear. I | assume this was because I pasted in error messages from Mathematica in | non text form, so I'll try again. | | I have a notebook with an initial cell that calls Combinatorica and | contains a number of function definitions of the set delayed type. Each | time I open the notebook I seem to get a different behaviour when I | evaluate the first cell. Two different sets of messages resulting from | an evaluation of the first cell are pasted in below this message. | | | Most recently I did the following: | | 1. Start Ma and open the file. Evaluate the first cell. This gives me | the long list of error messages pasted in below. | 2. Then close Ma without saving anything. Restart Ma and reopen the | notebook, without evaluating the first cell. I then opened a new | notebook and pasted the definitions from the original notebook and | evaluated them one at a time. No error messages. | | Other times I get a single warning about using the variable "list" | (defined inside a module) that is similar to "List". Does Ma remember | data from previous sessions even though I have closed the program? What | am I not understanding here?? | | Ma 5.0 Windows XP Pro | | Thanks | | LP | | Error messages: | | RowBox[{\(VertexNumber::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"VertexNumber\\\"\\) appears in multiple contexts \ | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \\\"Global`\\\"}\\); | definitions \ | in context \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be \ | shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(VertexStyle::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"VertexStyle\\\"\\) appears in multiple contexts \ | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \\\"Global`\\\"}\\); | definitions \ | in context \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be \ | shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(SetDelayed::"write"\), \(\(:\)\(\ \)\), "\<\"Tag | \\!\\(Times\\) \ | in \\!\\(Null\\\\ Null\\\\ Null\\\\ Null\\\\ Null\\\\ Null\\\\ Null\\\\ \ | Null\\\\ Null\\\\ Null\\\\ Null\\\\ \\(\\(\[LeftSkeleton] 11 | \[RightSkeleton]\ | \\)\\)\\\\ Null\\\\ Null\\\\ Null\\\\ Null\\\\ Null\\\\ Null\\\\ Null\\\\ \ | Null\\\\ Null\\\\ Null\\\\ \\(\\(blchains[n_]\\)\\)\\) is Protected. \ | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", | ButtonStyle->\\\"RefGuideLinkText\ | \\\", ButtonFrame->None, ButtonData:>\\\"General::write\\\"]\\)\"\>"}]\) | Out[1]= | $Failed | | | Here are messages from another fresh valuation of the first cell (they | are not the same as those above!?) | | >From In[1]:= | \!\(\* | RowBox[{\(General::"spell1"\), \(\(:\)\(\ \)\), "\<\"Possible spelling \ | error: new symbol name \\\"\\!\\(Large\\)\\\" is similar to existing | symbol \ | \\\"\\!\\(Larger\\)\\\". \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::spell1\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(Blue::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"Blue\\\"\\) appears in multiple contexts \ | \\!\\({\\\"Graphics`Colors`\\\", \\\"Global`\\\"}\\); definitions in | context \ | \\!\\(\\\"Graphics`Colors`\\\"\\) may shadow or be shadowed by other \ | definitions. \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(Green::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol | \\!\\(\\\"Green\\\"\ | \\) appears in multiple contexts \\!\\({\\\"Graphics`Colors`\\\", | \\\"Global`\ | \\\"}\\); definitions in context \\!\\(\\\"Graphics`Colors`\\\"\\) may | shadow \ | or be shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\ | \", ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(Red::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol | \\!\\(\\\"Red\\\"\\) \ | appears in multiple contexts \\!\\({\\\"Graphics`Colors`\\\", \ | \\\"Global`\\\"}\\); definitions in context | \\!\\(\\\"Graphics`Colors`\\\"\\) \ | may shadow or be shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\ | \[Ellipsis]\\\", ButtonStyle->\\\"RefGuideLinkText\\\", | ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(AddEdges::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"AddEdges\\\"\\) appears in multiple contexts \ | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \\\"Global`\\\"}\\); | definitions \ | in context \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be \ | shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(AddVertices::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"AddVertices\\\"\\) appears in multiple contexts \ | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \\\"Global`\\\"}\\); | definitions \ | in context \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be \ | shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(DeleteEdges::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"DeleteEdges\\\"\\) appears in multiple contexts \ | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \\\"Global`\\\"}\\); | definitions \ | in context \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be \ | shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(EdgeColor::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"EdgeColor\\\"\\) appears in multiple contexts \ | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \\\"Global`\\\"}\\); | definitions \ | in context \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be \ | shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(Edges::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol | \\!\\(\\\"Edges\\\"\ | \\) appears in multiple contexts | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \ | \\\"Global`\\\"}\\); definitions in context \ | \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be shadowed by \ | other definitions. \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(EdgeStyle::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"EdgeStyle\\\"\\) appears in multiple contexts \ | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \\\"Global`\\\"}\\); | definitions \ | in context \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be \ | shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(GridGraph::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"GridGraph\\\"\\) appears in multiple contexts \ | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \\\"Global`\\\"}\\); | definitions \ | in context \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be \ | shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(KSubsets::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"KSubsets\\\"\\) appears in multiple contexts \ | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \\\"Global`\\\"}\\); | definitions \ | in context \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be \ | shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(Large::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol | \\!\\(\\\"Large\\\"\ | \\) appears in multiple contexts | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \ | \\\"Global`\\\"}\\); definitions in context \ | \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be shadowed by \ | other definitions. \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(SetGraphOptions::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"SetGraphOptions\\\"\\) appears in multiple contexts \ | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \\\"Global`\\\"}\\); | definitions \ | in context \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be \ | shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(Thick::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol | \\!\\(\\\"Thick\\\"\ | \\) appears in multiple contexts | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \ | \\\"Global`\\\"}\\); definitions in context \ | \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be shadowed by \ | other definitions. \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* | RowBox[{\(VertexColor::"shdw"\), \(\(:\)\(\ \)\), "\<\"Symbol \ | \\!\\(\\\"VertexColor\\\"\\) appears in multiple contexts \ | \\!\\({\\\"DiscreteMath`Combinatorica`\\\", \\\"Global`\\\"}\\); | definitions \ | in context \\!\\(\\\"DiscreteMath`Combinatorica`\\\"\\) may shadow or be \ | shadowed by other definitions. | \\!\\(\\*ButtonBox[\\\"More\[Ellipsis]\\\", \ | ButtonStyle->\\\"RefGuideLinkText\\\", ButtonFrame->None, \ | ButtonData:>\\\"General::shdw\\\"]\\)\"\>"}]\) | >From In[1]:= | \!\(\* |

**Follow-Ups**:**Re: Re: Inconsistent evaluation***From:*leigh pascoe <leigh@cephb.fr>