Newsgroups: comp.lang.apl
Path: watmath!watserv1!utgpu!news-server.csri.toronto.edu!rpi!think.com!wupost!uunet!psinntp!newstand.syr.edu!lynx.cat.syr.edu!bli
From: bli@lynx.cat.syr.edu (Bin Li)
Subject: Array I/O in J.
Message-ID: <1992Jan30.035425.2938@newstand.syr.edu>
Organization: Syracuse University
Date: Thu, 30 Jan 92 03:54:25 EST


I've received many valuable suggestions on my previous questions.  Thank
you very much for the help.

One problem still not clear to me is how to perform the conversions 
between numerical data and character data in J. For example, I use 

(, ,"1&(10{a.) ":array) 1!:2 < 'file_name'         

 to output a 2 dimensional  array.  Then I do this

 infile =. (".;._2) 1!:1 <'file_name' 

to read it back in.  They look the same but the internal representation of 
"infile" is neither integer nor floating point number.  How can I convert
it back to the numerical representation so that mathematical operations 
can be performed on array "infile"?

 I understand that using the J internal file system and LinkJ together can
solve the problem.  I just wonder if there is a straight-forward approach
to do it.   




Bin Li 
Syracuse Univ. 

