1!:1 <'foo' does indeed produce a string (the bytes of the file). You have to process it from that form.
In x 1!:2 <'bar' x must be a string too. Henry Rich On 12/23/2010 2:02 PM, Steven Taylor wrote: > Hi, > > I'm having a few challenges reading / writing files. I seem to be able to > write them okay, but reading one back in gives me a string (do I need a > cast?). > > I have been using some of Devon's definitions (haven't worked out how to use > "load 'jfiles'" yet. Also, examples from > http://www.jsoftware.com/help/user/component_files.htm wiki were failing > here). > > Some of Devon's definitions: > > fopen=: [:1!:21< > > fclose=: [:1!:22< > > fwrite=:1!:2 > > thanks, > > -Steven > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
