slowly I begin to understand,
first of all I have to define the load but I am not able to find the
information on how to use the foreign  command 0!:x to load profile.ijs

once I will be able to load modules, to make a verb should not be a big
problem
I can embedded J command and macro functions in C++ classes




On Thu, Jan 2, 2020 at 6:55 PM Henry Rich <[email protected]> wrote:

> It appears that multiline definitions cannot be handled through a single
> call to JDo:
>
>     ". 't =: verb define' , LF , 'a =: 111 ' , LF , ')' , LF
> |spelling error
>
> Here's a keyboard session, annotated
>     ".'t =: verb define'   NB. enter this line
>
> Here you get a prompt of 0 spaces, indicating that the JE is waiting for
> keyboard input for the definition
>
> a =: 111
> )
>
>
> After entering ), I get the 3-space prompt indicating the ". verb
> completed execution.
>
>     t
> 3 : 'a=:111'
>
>
>
> I don't know whether there is any way to create a multiline definition
> using LF without going through 0!:x.  If it's short yo could create
> boxed strings:
>
>    ". 't =: 3 : (''a =: 112'' ; ''b =: 113'')'
>
>
>
> load is not defined until you have used 0!:x to load the base library,
> as Bill pointed out.
>
> Henry Rich
>
>
>
>
> On 1/2/2020 12:37 PM, Strale wrote:
> >   The \r is the right one  thank you
> > but even with the correct end of line I tried several combinations \r
> and \n
> > but without success the error is value error or spelling error
> > also the profile.ijs  when I try to load it with JDo  give me back "value
> > error"
> > I have also put it in the executable directory but without success.
> >
> >
> > On Thu, Jan 2, 2020 at 4:06 PM David Lambert <[email protected]>
> wrote:
> >
> >> Perhaps those /r should be \r ?
> >>> Date: Thu, 2 Jan 2020 12:18:00 +0100
> >>> From: Strale<[email protected]>
> >>> To:[email protected]
> >>> Subject: [Jprogramming] J lib question
> >>> Message-ID:
> >>>        <
> >> cal2u57zrpqnx32dag7v3bdgao6ufhunn6ycq61sgiic6oag...@mail.gmail.com>
> >>> Content-Type: text/plain; charset="UTF-8"
> >>>
> >>> Hello
> >>>
> >>> I am trying to mix J with C++ in Linux
> >>> I have included in my C++ project jfex.h libj.h  and libj.so
> >>> after calling  JInit() I am able to execute simple sentences with JDo
> and
> >>> get the result with JGetA
> >>> but I am not able to define more sofisticate behaviours ex. define J
> >>> function with verb define
> >>> ex.
> >>>     int JDo(jt,"testverb =: verb define /r a=: 111 /r )");
> >>>     fails with error: domain error
> >>> or loading module ex plot.ijs
> >>>     fails with error: value error
> >>>
> >>> do I am doing something wrong as missing some initialisation?
> >>>
> >>> Cheers
> >>> Paolo
> >>>
> >> ----------------------------------------------------------------------
> >> For information about J forums see http://www.jsoftware.com/forums.htm
> >>
> >
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>


-- 
We are made of star dust
(Carl Sagan)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to