The old way of cd used to return a boxed list of result and all the arguments. That's not a good way to handle things. This is why the new form is used with '>' in the declaration. It returns only the last result.
In order to get results from parameters you need to declare a pointer and pass an array. In (almost) all struct elements are on word boundary, it's better to use int array. See how this is working structs media\platimg\win.ijs --- Yuvaraj Athur Raghuvir <[EMAIL PROTECTED]> wrote: > Hmm... I found the posting on the mailing archive [1] that has Oleg's > response on how to use structures. But when I look into task.ijs code, I am > completely lost. I am particularly confused on how the return value is > interpreted as an array of value although the declaration has return defined > as a boolean. > > As an example, we have: (from task.ijs) > > Declaration: > CreatePipeF=: 'kernel32 CreatePipe i *c *c *c i'&cd > > Use: > 'r hRead hWrite sa1 i1'=. CreatePipeF (sint 0);(sint 0);sa;size > > If the CreatePipeF returns an integer (i), how can the return value in the > use have so many parameters?? > > Some clues here will help. > > Thanks, > Yuva > > [1] http://www.jsoftware.com/pipermail/programming/2007-May/006701.html > > On 8/1/07, Yuvaraj Athur Raghuvir <[EMAIL PROTECTED]> wrote: > > > > Hmmm... that was easy. Enumerators are treated like integers and we have > > to explicitly set the values in the wrapper. > > > > For returned/passed structures, is * alone enough in the declaration? Am > > trying that now... > > > > ~Yuva > > > > > > On 8/1/07, Yuvaraj Athur Raghuvir <[EMAIL PROTECTED]> wrote: > > > > > > Hello, > > > > > > How to incorporate enumerations in the J wrapper to C/C++ dlls in a way > > > that names can be passed to the verb but interpreted as an integer of the > > > right enumeration type? > > > > > > Regards, > > > Yuva > > > > > > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ____________________________________________________________________________________Ready for the edge of your seat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/ ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
