[Jprogramming] Comma for every three digits

Björn Helgason gosinn at gmail.com
Fri Jan 27 21:06:29 HKT 2006


  }:@(;@pac at ci3&.|.)@": 12^20x
3,833,759,992,447,475,122,176
  }: (;@pac at ci3&.|.) ": 12^20x
3,833,759,992,447,475,122,176


What is the difference of using the Atop  @ or not in the above?

Both seem to be giving the same result

I have to admit I have not used the @ nor & very much

They seem to be quite useful but I am not sure why or when to use them

2006/1/26, John Wilson <john.wilson098 at sympatico.ca>:
>
>    ci3 =: _3&(<\)            NB. cut into 3's
>    pac =: ','&(,&.>)         NB. prepend a comma
>    }:@(;@pac at ci3&.|.)@": 12^20x
> 3,833,759,992,447,475,122,176
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



--
Björn Helgason, Verkfræðingur, gsm: +354698 5532
Fugl&Fiskur ehf, Þerneyjarsund 23,
802 Selfoss ,t-póst: gosinn at gmail.com
http://www.linux.is/forritun/data/J/grunnur.pdf


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  |
   (   -.  |        `-----------------------------------'
   |     ) |
  (`-.  '--.)
   `. )----'


More information about the Programming mailing list