Never noticed that because I always made sure that I always passed literal
lists to the files verbs. I looked at fwrite and fappend as well and as you
pointed out, they are inconsistent. Personally I would prefer that the files
verbs only take literal lists as that is how it appears in the files written
out. In this case, if you read the data back in, it would not be the same as
when you wrote it out.
On Tue, Apr 22, 2008 at 1:20 AM, Sherlock, Ric <[EMAIL PROTECTED]>
wrote:
> Using the verb fwrites from files.ijs I can write a numeric table to file
> as a string.
>
> (i.4 5) fwrites jpath '~temp/myfile.txt'
> 64
>
> This works because the first line of the verb is:
> dat=. ":x
>
> However fappends does not work the same way and requires that the left
> argument is already a string.
> (i.4 5) fappends jpath '~temp/numtable2.txt'
> |domain error: fappends
> | dat=.dat ,"1 toHOST LF
> (": i.4 5) fappends jpath '~temp/numtable2.txt'
> 64
>
> The first line of fappends is:
> dat=. x
>
> I think both verbs should work the same way and suggest that the first
> line of fappends should be changed to mirror fwrites.
>
> Is there a reason that they shouldn't be the same?
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm