Boost logo

Boost :

From: Aaron W. LaFramboise (aaronrabiddog51_at_[hidden])
Date: 2004-10-03 17:45:45

David Abrahams wrote:
> "Tony Juricic" <tonygeek_at_[hidden]> writes:
>>Even MS IDE has problems in some cases (very inconsistent) when space
>>characters are present but I thought that in most Wintel and also UNIX
>>command tools these issues are easily solved with adding quotes?
> You'd be surprised how much complication that adds for some people.

I'd just like to point out that in the command-line Windows world,
spaces in a single argument of any kind, including filenames, are doomed
to fail eventually, because native Windows command lines are simply a
single linear string of characters. There is no array of strings as in
Unix, no matter what argv says. There is also no particular standard or
agreement on how one might group arguments or indicate that several
whitespace-delimited tokens should b considered as one, although various
quote characters sometimes work.

Writers of command line programs can work around this on a case-by-case
basis, such as adopting the convention to use the double-quote as a
grouping character. However, in nontrivial systems where command line
programs are passing data to other command line programs, it is the
usual case that some component or other inappropriately quotes for a
subprogram, or forgets to quote filenames at all.

For this reason, spaces should never be used in filenames of projects
intended to be robust on Windows. On the other hand, writers of command
line programs that accept filenames as a parameter should always test
their programs to ensure that filenames with spaces will be accepted

Aaron W. LaFramboise

Boost list run by bdawes at, gregod at, cpdaniel at, john at