[Jprogramming] pwd? tasks.ijs?
Bill Harris
bill_harris at facilitatedsystems.com
Fri Mar 2 08:52:50 HKT 2007
"Devon McCormick" <devonmcc at gmail.com> writes:
> NB. where we extend standard replace function:
> multiReplace=: 4 : 0
> NB.* multiReplace: multiple replacement, sequentially, using pairs in x.
> NB. to alter y..
> parms=. x. NB. Reshape vector arg to 2-col mat.
> if. 1=#shp=. $parms do. parms=. (0 2+0.5 0*2$shp)$parms end.
> template=. y.
> while. 0<#parms do.
> template=. (0{parms) replace template
> parms=. }.parms
> end.
> template
> NB.EG ('s';'is';'this';'glorp') multiReplace 'ths s a tst'
> )
Devon,
Pardon my blind spot, but where is the "standard replace function"? I
can't find it. I can find rplc, but that didn't work (neither did
x. and y., but I changed those, too).
Thanks,
Bill
--
Bill Harris http://facilitatedsystems.com/weblog/
Facilitated Systems Everett, WA 98208 USA
http://facilitatedsystems.com/ phone: +1 425 337-5541
More information about the Programming
mailing list