Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!bloom-beacon!apple!oliveb!stratus!gbs From: gbs@stratus.UUCP (George B. Smith) Newsgroups: comp.sys.ibm.pc Subject: Re: pathnames Message-ID: <1680@stratus.UUCP> Date: 20 Feb 89 07:08:43 GMT References: <2569@pegasus.ATT.COM> <3847@cbnews.ATT.COM> <662@mks.UUCP> <10353@ut-emx.UUCP> <1623@stratus.UUCP> <783@ethz.UUCP> Reply-To: gbs@stratus.UUCP (George B. Smith) Organization: Stratus Computer, Inc. Western Development Center Lines: 36 In article <783@ethz.UUCP> zu@bernina.UUCP (Urs Zurbuchen) writes: >In article <1623@stratus.UUCP> gbs@stratus.UUCP (George B. Smith) writes: >>And it is very easy to do, as I said before. All a program has to do >>is find out the current setting of the switch char. >Now, I don't agree with this one. Why not allow '/' and '\' as directory >separators in pathnames. In most cases you even don't have to stick >with '-' as the switch character but can allow '/' as that, too. I would answer that I think it is ugly to have *both* backslashes *and* forward slashes in the same path name. I would say that at some level this can be considered a personal, esthetic consideration and would be very hard to agree on. I just prefer C:/top/sub1/sub2/file over C:\top/sub1\sub2/file. Although, on a technical level, mixing the separator characters would effectively disallow the use of the backslash as an escape character which is a common convention. I would hazard the guess that people who would like to use the forward slash as the path separator would like to use the backslash as the escape character. >>... if the current switch char is '-', then >>assume the path separator is the '/'; if the switch char is not the >>'-', then I would say it is safe that you can assume the path separator >>is the '\'. >The safest way is to test for '/' as the switch character. If so, path >separator has to be '\'. Otherwise it's '/'. No need to test for '-'. I agree with Urs on this point. I will change my code to do as he suggests. Thanks for the insight. > Have a nice day, > ...urs And to you. George B. Smith Stratus Computer, Inc gbs@stratus.stratus.com {amdahl,oliveb,uunet}!stratus!gbs