OT: DOS/Windows and slashes (was Re: Windows XP Pro and PossiblefilePro Bug)

Kenneth Brody kenbrody at bestweb.net
Sun Dec 5 07:38:16 PST 2004


Fairlight wrote:
[...]
> Unfortunately, people have gotten too used to /switch arguments, and expect
> things to be "/?" for help instead of "-h" or "--help".  I had a Windows
> user request that I add "/?" as an argument for help for one of my
> packages.  Getopt doesn't like that though, so I have to cycle through the
> argv array and make sure none of them are that particular string.  It's
> useless on *nix as an option, unless you escape it or set noglob.  But
> Windows users insist it should be there.

Well, it can "work" under *nix if you have no single-character-name files
in the root directory.

> How annoying a convention.  Another instance of Not Invented Here.  :(

Under MS-DOS 1.0, which had no subdirectories, they chose to use "/" as
the switch character.  When DOS 2.0 came out, I guess they were afraid
to "break" too many batch files out there, and kept it, chosing to use "\"
as the path separator instead.  (Actually, there was an undocumented
CONFIG.SYS entry and and undocumented INT21 call to change it, but I doubt
that many did, simply because of breaking batch files.)

Too bad they didn't "fix" it in 2.0, and give you a way to run old batch
files, rather than keep it "broken".

> I don't mind porting to MS in a functional sense.  Being asked to emulate
> a poor design decision that became a defacto convention is something that
> will rankle me a little, but I did it anyway.  If that's what they want,
> that's what they get.  It's just one of those "gotchas" to keep in mind
> when porting.

I haven't heard anyone complain that filePro doesn't allow "/" for flags.
:-)

> I've seen it go the other way--someone had a Windows package that was being
> ported to linux, and all the argument options started with / and you'd put
> in a pathname to a file and it would want to say it was an illegal option
> rather than taking it as part of the path.  They fixed theirs as well, but
> it's annoying that not everyone has adopted the relatively sane - and --
> getopt switch standards.

How many have whined about "you" not allowing backslashes for filenames on
the command line?  ;-)

-- 
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody        | www.hvcomputer.com |                             |
| kenbrody/at\spamcop.net | www.fptech.com     | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
Don't e-mail me at: <mailto:ThisIsASpamTrap at gmail.com>



More information about the Filepro-list mailing list