[Mono-dev] Need PutVar method on Mono.CSharp.Evaluator
Charles Rich
rich at WPI.EDU
Mon Aug 15 11:36:44 EDT 2011
Hi Mark, Thanks for the reply, but that just pushes the problem one
level back, i.e., how is 'whatever' set to the result of the
evaluation? The point is that I need to be able to pass the result
of the evaluation around *outside* the evaluator and then feed it back
in.
-CR
On Mon, Aug 15, 2011 at 11:27 AM, Marek Safar <marek.safar at gmail.com> wrote:
> Hello,
>>
>> Hi, I am new to Mono, but becoming a big fan quickly (more detail
>> below regarding what I am doing with it). To get right to the point,
>> however, I would appreciate advice on how to *programmatically* set
>> the value of a variable that can be seen inside the Evaluator, e.g.,
>>
>> var temp = Evaluator.Evaluate("...");
>> Evaluator.PutVar("x", temp); // so such method exists!
>> Evaluator.Run("... x ...");
>
> You can simply run C# statement which will do the assignment. Trivial
> example can look like this
>
> Evaluator.Run("x = whatever");
>
> Marek
>
--
Dr. Charles Rich, Professor of Computer Science
Interactive Media and Game Development
Worcester Polytechnic Institute, Fuller Laboratories B25b
100 Institute Road, Worcester, MA 01609-2280
Email: rich at wpi.edu Phone: 508-831-5945 Fax: 508-831-5776
Home: http://www.cs.wpi.edu/~rich
More information about the Mono-devel-list
mailing list