Question

I'm trying example from Learning J but it doesn't work. How do I write to/read from a file in J?

   F =: 'c:\temp\demofile.xyz'       NB. a filename
   'some data' 1!:2 < F    NB. write to file F
|file name error
|   'some data'    1!:2<F

I'm trying it under Windows 7.

Was it helpful?

Solution

As @Eelvex suggested the problem was with writing permission to the folder 'c:\temp'. Yet the file name was fine, J produced file name error due to the lack of permissions.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top