On 5/30/07, Dan Bron <[EMAIL PROTECTED]> wrote:
To my mind, the 5!:5 representation of a complex J structure has
no advantages over the 3!:1 representation.
Oh?
How would you write a verb which, given a locale name, returns a
script which would redefine the current content of that locale, using
3!:1?
Here's how I might do this using 5!:5
defn=:3 :'5!:5 boxopen y'
nams=:3 :'(nl__y$0),&.>(''_'',''_'',~])&.>~y=.boxopen y'
localescript=:[: ; (LF,~],'=:',defn)&.>@nams
Example use:
localescript'base'
defn_base_=:3 : '5!:5 boxopen y'
localescript_base_=:[: ; ((10{a.) ,~ ] , '=:' , defn)&.>@nams
nams_base_=:3 : '(nl__y$0),&.>(''_'',''_'',~])&.>~y=.boxopen y'
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm