Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #4029 > unrolled thread
| Started by | Alexey Popkov <lehin.p@gmail.com> |
|---|---|
| First post | 2011-07-28 11:59 +0000 |
| Last post | 2011-07-28 11:59 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.soft-sys.math.mathematica
Why FullDefinition does not work in MathLink mode? Alexey Popkov <lehin.p@gmail.com> - 2011-07-28 11:59 +0000
| From | Alexey Popkov <lehin.p@gmail.com> |
|---|---|
| Date | 2011-07-28 11:59 +0000 |
| Subject | Why FullDefinition does not work in MathLink mode? |
| Message-ID | <j0rivk$435$1@smc.vnet.net> |
Hello,
When working with MathKernel in interactive session without of the
FrontEnd, FullDefinition works as expected:
In[1]:= a=2;FullDefinition[a]
Out[1]= a = 2
But when trying to use it in MathLink mode one get ReturnPacket with
unevaluated FullDefinition:
In[1]:= kernel=LinkLaunch[First[$CommandLine] <> " -mathlink"];
LinkRead[kernel];
LinkWrite[kernel,Unevaluated[a=2;FullDefinition[a]]]
LinkRead[kernel]//FullForm
Out[4]//FullForm= ReturnPacket[FullDefinition[a]]
The built-in parallelization functions have the same problem:
In[2]:= ParallelEvaluate[a=2;FullDefinition[a]]//FullForm
Out[2]//FullForm= List[FullDefinition[a],FullDefinition[a]]
One workaround is to use ToString:
In[3]:= ParallelEvaluate[a=2;ToString[FullDefinition[a]]]
Out[3]= {a = 2,a = 2}
Why FullDefinition returns unevaluated in MathLink session although it
works as expected in interactive MathKernel session? Is it possible to
make it working without any glitches?
Any ideas?
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web