Dave Tweed wrote: > Gerhard Fiedler wrote: >> Dave Tweed wrote: >>> Yes, on an archaic system like the Windows command-line processor (which >>> has distant roots in the original CP/M CCP), the application programs >>> must do some of the work of handling the "raw" command line. >> >> Are you sure about this? When was the last time you wrote a CLI program on >> Windows where you had to handle the raw command line and didn't have access >> to an array of parsed command line arguments? What language did you use? > > I never have. YOU'RE the one who said that applications built to work with > Windows shells need to handle quoted arguments. May I quote you: "Yes, on an archaic system like the Windows command-line processor (which has distant roots in the original CP/M CCP), the application programs must do some of the work of handling the "raw" command line." This made me assume you knew what you were talking about -- you sure didn't just copy me :) > I assume that the command-line handling is hidden in run-time libraries > that come with the software development environments for Windows. That's probably correct, and is probably the same as it is in *ix environments. >> On a modern system (since the mid-1970s -- note the irony there), such >> as any *ix shell, the shell itself correctly handles ALL of the >> command-line issues, and passes arrays of fully parsed arguments and >> environment variables directly to the application program. You said that in *ix environments, that's handled by the "shell". If you mean the command processor (e.g. the bash shell), that would mean that in *ix environments, you couldn't run a CLI application without going through a command processor. At least in Windows, you can run a CLI application directly, without a command processor (like cmd.exe), so the command line argument handling has to happen elsewhere (for example in the C runtime). I'm not really sure you're correct with your statement that in *ix this all happens in the shell. I'm rather certain that it is possible to run an executable on *ix without spawning a shell, so the command line handling probably happens elsewhere. > Pretty much all of the command-line software I write for Windows is done > either in Perl or gcc, which are the same thing, really, when it comes to > handling the command line. So... I assume you do get your arguments as an array in both, right? How does this relate to "the application programs must do some of the work of handling the "raw" command line"? Gerhard -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist