Here's a sketch of out I might implement the file conversion
mechanism Vladimir Lazunin discussed on Tuesday:

require 'files'
convCoords=:((16j1#3#1)expand 48{.8}.i.64) {"1 (4 s: ])
convPoints=: [: (i.~ ~.@,) 0 ". (16}.i.48) {"1 (4 s: ])
out=:'out.txt'fwrite~]
outMore=: 'out.txt'fappend~]

s=: s: 'b' fread 'sample.txt'
'node eShell end'=: 1 2 _2+s i. s:' *NODE *ELEMENT_SHELL *END'
nodeLen=: (node}.s)i.{.s: ' $'
out ,LF,.~convCoords nodeLen{.node}.s
(LF outMore@, ":@~.)"1 convPoints (eShell}.i.end){s


(beware of line wrapping)

I've probably left out something important -- I'm ignorant about
the full file spec.  And further improvements are might be possible
especially in light of the things I'm ignorant about.

But perhaps this presents some useful ideas for...

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to