Order of execution of initialization cells
- To: mathgroup at smc.vnet.net
- Subject: [mg8884] Order of execution of initialization cells
- From: "John E. Derwent" <John.E.Derwent.1 at nd.edu>
- Date: Tue, 30 Sep 1997 20:16:52 -0400
- Sender: owner-wri-mathgroup at wolfram.com
Using 3.0.1, consider the two commands: <<Calculus`VectorAnalysis` SetCoordinates[Cartesian[x,y,z]] Each of these is in its own cell, which is an Initialization Cell. I want to load the package and then change the coordinates from the default {Xx, Yy,Zz} to the more usual {x,y,z} (which incidentally were the default in 2.2). When the first cell is evaluated, what should happen? After I indicate that I do want to evaluate all Initialization Cells, In[1] appears before the first command, then In[2] appears before the second command, and there is the expected output to the second command, and then In[3] appears before the first command, and then execution is complete. But the coordinates have been set back to the default {Xx, Yy,Zz} instead of to {x,y,z}. I've tried this both on a Mac and a Sparc, with the same result. It appears that the second command was executed before the first command was completed, and so was later overridden. Shouldn't we expect the consecutive cells to be completely evaluated consecutively? Why weren't they? How can I make the Initialization Cells execute completely in the right order? In general, when will Initialization Cells evaluate consecutively?