Re: [Jprogramming] Displaying stock market data

2019-09-12 Thread Raul Miller
Then again: require'format/printf' '%.8g' sprintf 1p1 3.14159265 Thanks, -- Raul On Thu, Sep 12, 2019 at 10:13 AM 'robert therriault' via Programming wrote: > > Hi Devon, > > You are probably thinking of the foreign conjunction 8!:y (Format) > > J dictionary https://www.jsoftware.com/he

Re: [Jprogramming] Displaying stock market data

2019-09-12 Thread Devon McCormick
Bob - thanks, yes that's it. It does not seem to come up in a search for "format" unless it's further down than I bothered looking. On Thu, Sep 12, 2019 at 10:13 AM 'robert therriault' via Programming < programm...@jsoftware.com> wrote: > Hi Devon, > > You are probably thinking of the foreign co

Re: [Jprogramming] Displaying stock market data

2019-09-12 Thread 'robert therriault' via Programming
Hi Devon, You are probably thinking of the foreign conjunction 8!:y (Format) J dictionary https://www.jsoftware.com/help/dictionary/dx008.htm Nuvoc https://code.jsoftware.com/wiki/Vocabulary/Foreigns#m8 Cheers, bob > On Sep 12, 2019, at 6:57 AM, Devon McCormick wrote: > > I tried searching t

Re: [Jprogramming] Displaying stock market data

2019-09-12 Thread Devon McCormick
I tried searching the wiki and noticed that there is a "printf" add-on for C-like formatting. Also, I recall that there is something that uses text format specifiers, like '<9.3d>' or such. I know I've used it but cannot find the code or a reference on the J site. On Thu, Sep 12, 2019 at 12:38 A

Re: [Jprogramming] Displaying stock market data

2019-09-11 Thread Henry Rich
I'm puzzled.  When you look at https://code.jsoftware.com/wiki/Vocabulary/quoteco#dyadic , the second example uses a complex x to control formatting.  If you read on in the detail, you see complex x used repeatedly. Do this: go back to that page and read carefully, especially after "More Info

Re: [Jprogramming] Displaying stock market data

2019-09-11 Thread 'robert therriault' via Programming
Also, use of complex x was mentioned a bit further down in the link that Henry supplied - sections 2 3 and 4 https://code.jsoftware.com/wiki/Vocabulary/quoteco#Numeric_y Cheers, bob > On Sep 11, 2019, at 9:15 PM, Roger Hui wrote: > > http://www.jsoftware.com/help/dictionary/d602.htm >

Re: [Jprogramming] Displaying stock market data

2019-09-11 Thread Roger Hui
http://www.jsoftware.com/help/dictionary/d602.htm , under the ": entry of the dictionary. It's been there since 2005. On Wed, Sep 11, 2019 at 9:04 PM HH PackRat wrote: > On 9/11/19, Henry Rich wrote: > > The definitive documentation of J i

Re: [Jprogramming] Displaying stock market data

2019-09-11 Thread HH PackRat
On 9/11/19, Henry Rich wrote: > The definitive documentation of J is NuVoc > https://code.jsoftware.com/wiki/NuVoc > ": is described in https://code.jsoftware.com/wiki/Vocabulary/quoteco#dyadic and Chris Burke said essentially the same thing. I'm very familiar with the ": primitive. It was the

Re: [Jprogramming] Displaying stock market data

2019-09-11 Thread chris burke
> Where is the 0j4 ": (and all of its variations) located in the J documentation? In Jqt, enter ": and with the cursor on or next to it, press Ctrl+F1 for the Vocabulary or Ctrl+Shift+F1 for NuVoc. On Wed, Sep 11, 2019 at 8:00 PM HH PackRat wrote: > On 9/11/19, Ric Sherlock wrote: > > Here are

Re: [Jprogramming] Displaying stock market data

2019-09-11 Thread Henry Rich
The definitive documentation of J is NuVoc https://code.jsoftware.com/wiki/NuVoc ": is described in https://code.jsoftware.com/wiki/Vocabulary/quoteco#dyadic Henry Rich On 9/11/2019 11:00 PM, HH PackRat wrote: On 9/11/19, Ric Sherlock wrote: Here are a couple of options 0j4 ": 5.7544987

Re: [Jprogramming] Displaying stock market data

2019-09-11 Thread HH PackRat
On 9/11/19, Ric Sherlock wrote: > Here are a couple of options >0j4 ": 5.75449876 654356.766578 > 5.7545 654356.7666 Thank you--that worked just the way I wanted. Thanks again to both you and Mike! Where is the 0j4 ": (and all of its variations) located in the J documentation? I want to ma

Re: [Jprogramming] Displaying stock market data

2019-09-11 Thread 'Mike Day' via Programming
Is this the sort of thing you need? 11.3^i.5. NB. plain output with default precision 1 11.3 127.69 1442.9 16304.7 10j2": 11.3^i.5. NB. Vector with 2dp 1.00 11.30127.69 1442.90 16304.74 10j2": ,.11.3^i.5. NB. Column vector with 2dp 1.00 11.30 127.69 1

Re: [Jprogramming] Displaying stock market data

2019-09-11 Thread Ric Sherlock
Here are a couple of options 0j4 ": 5.75449876 654356.766578 5.7545 654356.7666 '0.4' 8!:0] 5.75449876 654356.766578 ┌──┬┐ │ 5.7545│654356.7666│ └──┴┘ On Wed, 11 Sep 2019, 19:45 HH PackRat, wrote: > Although I can find general print precision in the J documentat

[Jprogramming] Displaying stock market data

2019-09-11 Thread HH PackRat
Although I can find general print precision in the J documentation, I can't seem to find how to display 2 decimal digits, 3 decimal digits, or 4 decimal digits, for example. In other words, I don't really care how many digits precede the decimal point, but I need to have a fixed number of digits f