vm=: 0 : 0
smoutput y
smoutput 'this was y'
smoutput ' '
smoutput x + y
smoutput 'this was the sum of x + y'
smoutput ' '
smoutput 'multiplied together they make'
x * y
)

Lets play with that noun a little bit.
It looks like a matrix

It also looks like a verb

  3 ( 4 : vm ) 5
5
this was y

8
this was the sum of x + y

multiplied together they make
15

That worked fine

Lets take some lines out of the matrix

   3  ( 4 : (3 4 5 6 7 {vm) ) 5
|syntax error
|   3    (4 :(3 4 5 6 7{vm))5
|[-0]

Hmmm... not so fine

   $vm
158

Because it was not a matrix

Lets chop it to boxes

   vb=: <;._2 vm

   $vb
8

   3 ( 4 : (3 4 5 6 7 {vb) ) 5
8
this was the sum of x + y

multiplied together they make
15

But if I do want the matrix

   vml=: [;._2 vm

   3  ( 4 : (3 4 5 6 7 {vml) ) 5
8
this was the sum of x + y

multiplied together they make
15

   $vml
8 40

   vml
smoutput y
smoutput 'this was y'
smoutput ' '
smoutput x + y
smoutput 'this was the sum of x + y'
smoutput ' '
smoutput 'multiplied together they make'
x * y



2010/3/1 Elmer Fittery <[email protected]>:
> symbols=:   ;:'A AAPL AMAT AMD AMZN ATT BA CRA CSCO DELL F GE GM HWP IBM
> INTC'
> symbols=: symbols,;:'JDSU LLY LU MOT MSFT NOK NT PFE PG QCOM RMBS T XRX YHOO'
>
>    3 { symbols
> +---+
> |AMD|
> +---+
>    8 { symbols
> +----+
> |CSCO|
> +----+
>    ] cards  =: ;: 'as 1s 2s 3s 4s 5s 6s 7s 8s 9s ts js qs ks'
> +--+--------------------------+--+--+--+--+
> |as|1s 2s 3s 4s 5s 6s 7s 8s 9s|ts|js|qs|ks|
> +--+--------------------------+--+--+--+--+
>
>
> How can I get all of the strings in the list to be boxed as opposed
> to only strings starting with a alpha character being boxed?
>
> thanks
>
>
>
>
>
>
>
>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>



-- 
Björn Helgason, Verkfræðingur
Fornustekkum II
781 Hornafirði
Po Box 127,801 Selfoss ,
t-póst: [email protected]
gsm: +3546985532
sími: +3544781286
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  |
   (   -.  |        `-----------------------------------'
   |     ) |         (\_ _/)
  (`-.  '--.)       (='.'=)   ♖♘♗♕♔♙
   `. )----'        (")_(") ☃☠
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to