evaluation sequence
- To: mathgroup at smc.vnet.net
- Subject: [mg23446] evaluation sequence
- From: "Frederic Montfort" <frederic.montfort at epfl.ch>
- Date: Wed, 10 May 2000 02:32:26 -0400 (EDT)
- Organization: EPFL
- Sender: owner-wri-mathgroup at wolfram.com
Hi,
I have some problems with the evaluation sequence.
I have two notebooks. The first should read two lists in the second notebook
and then work with these.
It works in step by step evaluation, but not in global evaluation. In this
case, Mathematica works with the name of the list and not with its contents.
Here is a simplified example. I work on mathemetica 4 on Windows NT
The second notebook called "variables.nb" contains:
In[13]:=variablesnames = {a, b, c} (*1st cell with Tag "varname"*)
In[14]:=variablesvalues = {1, 2, 3} (*2nd cell with Tag "varval"*)
1st notebook called "Work.nb"
(*1st cell*)
In[1]:=
nbVariables = NotebookOpen["variables.nb"];
nbWork = NotebookOpen["Work.nb"];
NotebookFind[nbVariables, "varname", All, {CellTags}];
SelectionMove[nbVariables, All, CellContents];
selectionnames = NotebookSelection[nbVariables];
FrontEndExecute[SelectionEvaluateCreateCell[selectionnames]]
NotebookFind[nbVariables, "varval", All, {CellTags}];
SelectionMove[nbVariables, All, CellContents];
selectionvalues = NotebookSelection[nbVariables];
FrontEndExecute[SelectionEvaluateCreateCell[selectionvalues]]
(*2nd cell*)
In[13]:=
variablesnames
variablesvalues
Output in step by step evaluation (1st and 2nd cell separately):
Out[13]={a, b, c}
Out[14]={1, 2, 3}
Output in global evaluation (1st and 2nd cell together):
Out[13]=variablesnames
Out[14]=variablesvalues
What can I do to have the lists as output ({a, b, c} and {1, 2, 3}) whith a
global evaluation?
Thanks a lot for your help
Frederi Montfort
------------------------------------------------------------------------
Frederic Montfort
Swiss Federal Institute of Technology (EPFL)
Institute of Applied Optics (IOA),
BM-Ecublens
CH-1015 Lausanne, Switzerland
tél: (+41 21) 693 5182
E-mail: frederic.montfort at epfl.ch
------------------------------------------------------------------------