The intent with this piece of code - which it achieves - is to make multiple
replacements multiple times, resulting in as many copies of of the updated
template as there are rows in "rawdata".  I often use this technique to
generate variants of a piece of code (in a non-J language) or XML based on a
boilerplate.

This discussion was useful in alerting me to "rplc" as its argument order
seems more natural for this task.

On Wed, May 5, 2010 at 10:25 PM, Chris Burke <[email protected]> wrote:

> I'm not sure exactly what you are doing, but just want to point out that
> rplc will do several replaces at once:
>
>   'abcdef' rplc 'a';'XY';'de';'DE'
> XYbcDEf
>
> On Thursday, May 06, 2010 07:24 AM, Alex Rufon wrote:
> > Hi Devon,
> >
> > I've been having some trouble using rplc without an explicit loop and
> your code here is juicy. :)
> >
> >>   body=. ;(<xmlUser) rplc&.>  <"1 ,"2 dummies,."(_ 1)rawdata
> >
> > Thanks!
> >
> > r/Alex
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Devon McCormick, CFA
^me^ at acm.
org is my
preferred e-mail
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to