Replacing a character or all-but-a-character: (#!.'*'~ [: 0j1&^ ' '&=) 'this is a test' this*is*a*test
(#!.'*'~ [: 0j1&^ ' '&~:) 'this is a test' **** ** * **** (#!.'I'~ [: 0j1&^ 'i'&=) 'this is a test' thIs Is a test --- David Vincent-Jones <[EMAIL PROTECTED]> wrote: > Thank you Björn; > > The dictionary currently does not shed much light on this rather interesting > use of complex. > > David > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Björn Helgason > Sent: Wednesday, March 22, 2006 9:35 AM > To: Programming forum > Subject: Re: [Jprogramming] Inserting spaces > > > 1j3 # 'Sassa' > S a s s a > 3j1 # 'Sassa' > SSS aaa sss sss aaa > a. i. 1j3 # 'Sassa' > 83 32 32 32 97 32 32 32 115 32 32 32 115 32 32 32 97 32 32 32 > a. i. 3j1 # 'Sassa' > 83 83 83 32 97 97 97 32 115 115 115 32 115 115 115 32 97 97 97 32 > > > The complex left argument a j. b copies a items followed by b fills. The fit > conjunction provides specified fills, as in #!.f . > > 2006/3/22, David Vincent-Jones <[EMAIL PROTECTED]>: > > > > OK Roger .. that went totally over my head ... > > Will you please explain how '1j1 #' is working. > > > > Thanks; > > > > David > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of Roger Hui > > Sent: Wednesday, March 22, 2006 8:26 AM > > To: Programming forum > > Subject: Re: [Jprogramming] Inserting spaces > > > > > > A solution different from the ones mentioned so far: > > 1j1 # 'Sassa' > > S a s s a > > > > If you don't want the final blank it can be easily removed: > > }: 1j1 # 'Sassa' > > S a s s a > > > > Tacitly: > > 13 : '}: 1j1 # y' > > [: }: 1j1 # ] > > > > p.s. If you read Russian you may be interested in the following > > Russian translation of the dictionary: > > http://galaxy.fzu.cz/~metlov/dictionary/contents.htm > > > > > > > > ----- Original Message ----- > > From: "???????????? ????????? ????????" <[EMAIL PROTECTED]> > > To: <[email protected]> > > Sent: Wednesday, March 22, 2006 6:08 AM > > Subject: [Jprogramming] Inserting spaces > > > > Hello guys. > > > > I have just started learning J and got some problems with TACIT form > > of thinking... Thus I'll be asking some silly question for first time > > :) > > > > So the question is: > > I have a string of chars. I need to insert space between each two > > characters. Sounds like a simple task, but I can't figure out how to > > compose a corresponding verb. > > > > Surely, I defined an explicit function solving this problem. It looks > > like > > > > join =: 4 : 0 > > x., ' ', y. > > ) > > > > now this works as > > join / 'Sassa' > > S a s s a > > > > It works well but it is a still imperative. And I want to learn to > > think in functionals. > > > > I will be very joyful if you help me. > > > > Thanks a lot, and sorry if made some spam :) > > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > ---------------------------------------------------------------------- > > For information about J forums see http://www.jsoftware.com/forums.htm > > > > > > -- > Björn Helgason, Verkfræðingur > Fugl&Fiskur ehf, Þerneyjarsund 23, > Skype: gosiminn, gsm: +3546985532 > 801 Grímsnes ,t-póst: [EMAIL PROTECTED] > http://groups.google.com/group/J-Programming > > > Tæknikunnátta höndlar hið flókna, sköpunargáfa er meistari einfaldleikans > > góður kennari getur stigið á tær án þess að glansinn fari af skónum > /|_ .-----------------------------------. > > ,' .\ / | Með léttri lund verður | > ,--' _,' | Dagurinn í dag | > / / | Enn betri en gærdagurinn | > ( -. | `-----------------------------------' > | ) | > (`-. '--.) > `. )----' __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
