[Jprogramming] converting APL-PLUS sf files

Raul Miller rauldmiller at gmail.com
Thu May 31 01:04:08 HKT 2007


On 5/30/07, Dan Bron <j at bron.us> 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


More information about the Programming mailing list