(3!:1) anynoun

is stringified data.

anynoun -: 3!:2 (3!:1) anynoun  NB. 3!:2 gets your data back.



> So is there a simple way to stringify my data tables so they can be streamed 
> to file easily?


________________________________
From: Alex Giannakopoulos <[email protected]>
To: [email protected] 
Sent: Thursday, December 3, 2015 4:26 PM
Subject: Re: [Jprogramming] Problem writing files


Ah, OK, Joe, I think I see what the problem is.
If I simply write a quoted string to the file it works fine. E.g.

1!:21 <'testfile'

30029424

    'hello' 1!:2 (30029424)
However I was trying to dump non-string variables, viz. tables, which is 
what it didn't like.  E.g.
     f1 =.1!:21 <'testfile'

     data =. >: i.10

     data 1!:2 f1
Just filled the file with binary data which I won't bother to put up here.

I was fooled because
    data 1!:2 (2)  NB. 2 => the screen
works

So is there a simple way to stringify my data tables so they can be 
streamed to file easily?

Thanks





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

Reply via email to