In my notebook, I have to call another file, let's say 'program.m' that defines functions, let's say
F of whom result
c I need in my notebook.
What I generally do, is to open a new front end and write
<<program.m F (*=c*)
and after copy and paste the result
c in my notebook.
Is there a way to do this inside my notebook, that is without opening a new notebook (and kernel) and evaluating there the above lines?
I'm thinking to use something like
ParallelEvaluate but I've never used parallel computations.
Now, program.m defines variables and functions sometimes using the same symbols that I used in my notebook for other purposes.
So I want that the computations made in my notebook and the ones made by program.m are completely independent each other, that is my notebook and program.m don't have to share functions and variables (for this reason, now I do it in two different kernels).
So, for example, in my notebook there is
a=0 and program.m has to compute
b=D[a,a] (*=1*) and I want
b in my notebook. I've tried
a=0; a (*0*) ParallelEvaluate[D[a,a],1] (*error*) ParallelEvaluate[D[a,a],2] (*error*)
but doesn't work. Any suggestions?