I think if you rummage around a bit in jmf you will see use examples. 15!:6
gives you the address of the symbol table entry (locale entry) which is a
structure from which you can get the address of the data. Hand waving:

  lad=: 15!:6<'mynoun'
  memr lad to get address of header that has info about the noun (type,
rank, shape, data address)

On Mon, Oct 18, 2010 at 11:15 PM, Henry Rich <[email protected]> wrote:

> Interesting.  I looked in jmf, and I tried
>
> 15!:7 verb
>
> which crashed J.
>
> I can't see which of these tells me the address of the data for a noun.
>  Can you help?
>
> I can't make any sense of the description of 15!:6 so I didn't try it.
>
> Henry Rich
>
> On 10/18/2010 11:03 PM, bill lam wrote:
> > Try these foreigns.
> >
> > symget=: 15!:6 NB. get address of locale entry for name
> > symset=: 15!:7 NB. set name to address header
> >
> > examples are provided inside jmf script.
> >
> > Пнд, 18 Окт 2010, Henry Rich писал(а):
> >> All of a sudden I have to interface to a DLL that takes a big buffer as
> >> input and produces a big buffer as output.
> >>
> >> The input I have, in the variable xxx, but the DLL requires that I
> >> create a structure that points to the input.
> >>
> >> I would like to stuff the address of the data (which is read-only to the
> >> DLL) into the structure; but I can't get that address.  So I have to
> >> allocate a big area whose address I know, and memw the data to it.
>  Ecch.
> >>
> >> I would like a new foreign: one that returns the memory address of the
> >> data of a noun (or maybe a name).
> >>
> >> Henry Rich
> >> ----------------------------------------------------------------------
> >> 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

Reply via email to