T=: ' fds34 3434 s 2e2d ' NB. 3 spaces at the beginning and end in T f T fds34 3434 s 2e2d deb T fds34 3434 s 2e2d f removes all but one space at the beginning, and T removes all of them. Both remove final spaces. '*', '*' ,~ f T * fds34 3434 s 2e2d* '*' , '*' ,~ deb T *fds34 3434 s 2e2d* ho I guess it depends how you use either.
Thanks for showing me the differences. Linda -----Original Message----- From: programming-boun...@forums.jsoftware.com [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of bill lam Sent: Saturday, October 27, 2012 3:11 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] danish blueberry porridge. Resolved! f does not remove all leading blanks, try '*', '*',~ f ' fds34 3434 s 2e2d ' * fds34 3434 s 2e2d* Сбт, 27 Окт 2012, Linda Alvord писал(а): > I noticed you suggested deb . I was wondering if the definition f is not > accounting for some case I have neglected? > > > deb > #~ (+. (1: |. (> </\)))@(' '&~:) > > f=: 13 :'y#~ (1|.'' ''~:y)+.'' ''~:y' > f > ] #~ (1 |. ' ' ~: ]) +. ' ' ~: ] > > f 'fds34 3434 s 2e2d' > fds34 3434 s 2e2d > > Linda > > -----Original Message----- > From: programming-boun...@forums.jsoftware.com > [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of bill > lam > Sent: Friday, October 26, 2012 9:41 PM > To: programm...@jsoftware.com > Subject: Re: [Jprogramming] danish blueberry porridge. Resolved! > > You may also use deb to remove extra blanks, eg > ([:#;._2,&' ') 7 u: deb 'blåbærgrød & crème fraise ' > 10 1 5 6 > > Сбт, 27 Окт 2012, Bo Jacoby писал(а): > > Bob's verb did the trick. Thank you everyone! > > ([:#;._2,&' ') 'blåbærgrød & crème fraise ' > > 13 1 6 6 0 0 0 > > ([:#;._2,&' ') 7 u: 'blåbærgrød & crème fraise ' > > 10 1 5 6 0 0 0 > > - Bo > > > > > > >________________________________ > > > Fra: Henry Rich <henryhr...@nc.rr.com> > > >Til: programm...@jsoftware.com > > >Sendt: 3:20 lørdag den 20. oktober 2012 > > >Emne: Re: [Jprogramming] danish blueberry porridge > > > > > >Somewhere there is a description of how to use dyad ;: to emulate > > >monad > > >;: . You can modify that as required. > > > > > >Henry Rich > > > > > >On 10/19/2012 8:57 PM, bob therriault wrote: > > >> What about using cut? (;.) > > >> > > >> k=.'blåbærgrød' > > >> k > > >> blåbærgrød > > >> t=: (a:-.~<;._2)@,&' ' NB. removing a: to clean up multiple > > >>spaces > > >> t k > > >> +-------------+ > > >> |blåbærgrød| > > >> +-------------+ > > >> k=.'blåbærgrød blåbærgrød' > > >> t k > > >> +-------------+-------------+ > > >> |blåbærgrød|blåbærgrød| > > >> +-------------+-------------+ > > >> k=.'blåbærgrød blåbærgrød' > > >> t k > > >> +-------------+-------------+ > > >> |blåbærgrød|blåbærgrød| > > >> +-------------+-------------+ > > >> > > >> On 2012-10-19, at 4:05 PM, Bo Jacoby wrote: > > >> > > >>> k=.'blåbærgrød' > > >> > > >> ----------------------------------------------------------------- > > >> -- > > >> --- For information about J forums see > > >> http://www.jsoftware.com/forums.htm > > >> > > >------------------------------------------------------------------- > > >-- > > >- For information about J forums see > > >http://www.jsoftware.com/forums.htm > > > > > > > > > > > -------------------------------------------------------------------- > > -- For information about J forums see > > http://www.jsoftware.com/forums.htm > > -- > regards, > ==================================================== > GPG key 1024D/4434BAB3 2008-08-24 > gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm -- regards, ==================================================== GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm