'd:\tmp'⎕ncreate ¯1
'd:\tmp'⎕nerase ¯1
So far so good, but
'd:\tmp'⎕ncreate ¨¯1
⎕NINFO ¯1
d:/tmp
'd:\tmp'⎕NERASE ¯1
FILE NAME ERROR: File name mismatch
'd:\tmp'⎕NERASE ¯1
∧
'd:/tmp'⎕NERASE ¯1
Does work
⎕NAMES also shows that the "\" has flipped to "/" after a call to ⎕NINFO
I don't think this is meant to happen
- Dick Bowman
- Posts: 235
- Joined: Thu Jun 18, 2009 4:55 pm
- Contact:
Re: I don't think this is meant to happen
Some weeks ago I suggested to Dyalog that it would be preferable (at least for me) if we were able to set what we wanted to use as filename separator - normalising file names through ⎕NPARTS, which seemed like a sensible thing to do, throws up a number of problems if you then try to use the filenames with other Windows components.
You can see that Dialog themselves contort code to deal with this - look at the SALTUtils namespace.
On the whole, I'd like to see filename separator either as something we can specify ourselves or as a system constant determined by checking the host OS.
You can see that Dialog themselves contort code to deal with this - look at the SALTUtils namespace.
On the whole, I'd like to see filename separator either as something we can specify ourselves or as a system constant determined by checking the host OS.
Visit http://apl.dickbowman.com to read more from Dick Bowman
- Richard|Dyalog
- Posts: 44
- Joined: Thu Oct 02, 2008 11:11 am
Re: I don't think this is meant to happen
You are quite right; it is not meant to happen. Querying the name of a tied file with ⎕NINFO is not supposed to change the name associated with it - that it apparently has done breaks ⎕NERASE as you demontrate. We will raise a bug report for this and fix it.