Cool! I changed it a little to work in C#:
var session = new Session();
session.Eval("result=: 2 + 2");
var result = session.Variable("result");
Console.Write(result);
What would I need to do if I wanted to execute a J script file directly
rather than just individual expressions?
On 9 July 2010 12:20, Alex Rufon <[email protected]> wrote:
> To get the result.
>
> Session Obj = new Session();
> Obj.Eval("result=: 2 + 2");
> Int result = 0;
> Obj.Variable("result",result);
>
>
> -----Original Message-----
> From: [email protected] [mailto:
> [email protected]] On Behalf Of Mark Needham
> Sent: Friday, July 09, 2010 6:51 PM
> To: Programming forum
> Subject: Re: [Jprogramming] Getting J to work with .NET
>
> Ah cool, thanks.
>
> So then if I've follow the instructions from there it should be possible to
> execute some J by doing the following (in C#)
>
> new Session().Eval("2 + 2")
>
> ?
>
> I tried that but I wasn't really sure what I need to do to get the result
> from that evaluation. Am I going about this the wrong way?
>
> Cheers, Mark
>
> On 9 July 2010 10:03, Alex Rufon <[email protected]> wrote:
>
> > Hi Mark,
> >
> > I wrote that guide for J601a and it will fail miserably if you're
> > using J602.
> >
> > Please refer to http://www.jsoftware.com/jwiki/Guides/J%20VB.NET for
> > more information.
> >
> > r/Alex
> >
> > -----Original Message-----
> > From: [email protected] [mailto:
> > [email protected]] On Behalf Of Mark Needham
> > Sent: Friday, July 09, 2010 3:44 PM
> > To: [email protected]
> > Subject: [Jprogramming] Getting J to work with .NET
> >
> > I've been following the guide to try and get J to work with C# -
> > http://www.jsoftware.com/jwiki/Guides/J%20CSharp - but trying out the
> > included demo app I can't find the 'JExeServerLib' dll.
> >
> > It shows as an unfound reference in Visual Studio and I don't see it
> > on the COM list of dlls.
> >
> > Any ideas?
> >
> > Thanks, Mark
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm