f1=: verb define 'line 1' 'line 2' 'line 3' 'line 4' 'line 5' ) m=: 0 : 0 'lina 1' 'lina 2' 'lina 3' 'lina 4' 'lina 5' ) f1 3 : 0 'line 1' 'line 2' 'line 3' 'line 4' 'line 5' ) m 'lina 1' 'lina 2' 'lina 3' 'lina 4' 'lina 5'
a=.5!:5 <'f1' a 3 : 0 'line 1' 'line 2' 'line 3' 'line 4' 'line 5' ) f2=: 3 : m f2 3 : 0 'lina 1' 'lina 2' 'lina 3' 'lina 4' 'lina 5' ) LF cut a ┌─────┬────────┬────────┬────────┬────────┬────────┬─┐ │3 : 0│'line 1'│'line 2'│'line 3'│'line 4'│'line 5'│)│ └─────┴────────┴────────┴────────┴────────┴────────┴─┘ LF cut m ┌────────┬────────┬────────┬────────┬────────┐ │'lina 1'│'lina 2'│'lina 3'│'lina 4'│'lina 5'│ └────────┴────────┴────────┴────────┴────────┘ 2011/12/31 Blake McBride <bl...@mcbride.name> > Greetings, > > More than 25 years ago I wrote an IDE for APL. At the core what I did > (which I don't remember how now) is that I executed something to turn > an APL function into a character matrix. I would then edit it with me > IDE editing facility. When I saved the edited function it would turn > the edited character matrix back into a function (was that quad FX?). > > I also used this ability (to turn an APL function to and from a > character matrix) to write programs that generated other functions. > This was very nice. > > This leads me to my question - how can I turn a J verb into a > character matrix, and how can I turn a character matrix back into a > verb? > > Thanks! > > Blake McBride > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > -- Björn Helgason, Verkfræðingur Fornustekkum II 781 Hornafirði, t-póst: gos...@gmail.com gsm: +3546985532 twitter: @flugfiskur 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