Hi, Joe, I haven't gone through your code in detail but it looks to me like a fine opportunity to use symbols. I'm quick to turn to symbols, maybe too quick, but if you're looking to treat sequences of characters (of varying lengths) as atoms, that's your ticket.
-- T On Aug 28, 2014 6:58 AM, "Joe Bogner" <joebog...@gmail.com> wrote: > Apologies for the extremely basic question, but I am struggling with > this after searching NuVoc and the dictionary. > > How do I locate all the indices of 'ab' in arr? > > arr=:10 $ > ;: 'ab cd yyy' > > surely this isn't the best way: > > ] (3 = +/"1 'ab' i. arr) # arr > ab > ab > ab > ab > > > I have been primarily dealing with boxed strings up to this point, > which seemed easier since it was locating an atom in a list, not a > list in a table (practicing my vocabulary here... I might be wrong > though) > > > Thanks, > Joe > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm