A useful verb would be sterrOut =: 3 : 0 smoutput y y )
I had always assumed that was what smoutput did. Yes that would mean that if sterrOut was the last line of a function, the output would be printed twice on screen, but I'd be surprised if anyone was relying on smoutput's "reshaping feature" for intentional string building in their code. Also of note, the pattern smoutput ] .... seems to be recommended, and I use it superstitiously, but it would only have an effect if the rhs is a modifier, that happens to be intended with v and not m. ----- Original Message ----- From: Raul Miller <[email protected]> To: Programming forum <[email protected]> Cc: Sent: Monday, September 16, 2013 11:32:09 AM Subject: Re: [Jprogramming] smoutput gotcha If you are confused by a result it sometimes helps to examine its shape. $ 3 :'smoutput y' 'asd' asd 0 0 $(( 3 : 'smoutput ] y') 'asd'), 'asdf' asd 1 4 FYI, -- Raul On Mon, Sep 16, 2013 at 8:47 AM, Pascal Jasmin <[email protected]> wrote: > (( 3 : 'smoutput ] y') 'asd'), 'asdf' > > asd > asdf > > > I was expecting: > > (( 3 : ' y') 'asd'), 'asdf' > asdasdf > > > j7-64. > ---------------------------------------------------------------------- > 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
