Olin Lathrop wrote: > To clarify, Windows makes the whole command line available to the > application as one string. You can do with it as you please. The shell > does do some substitutions if you use special characters, but quotes are > not significant. > > If you step back and think about it instead of just what you're used to, > this isn't such a bad idea. I would rather the operating system not think > it knows how my program wants to interpret the command line. Passing the > whole thing as a raw string is the most policy-free thing to do. It's > trivial enough to have some application-space layer parse it into tokens > if that's how you want to view the command line. No operating system, including Windows, imposes anything at all on the interpretation of the command line; that's entirely up to the shell, whether that shell is cmd.exe or bash. It just so happens that the text-based shells that come with Windows take the view that they are pretty much just there to invoke programs, and any functionality beyond that is primitive at best. Programming in .BAT files is a lot like programming using an old-style BASIC interpreter. As a result, applications tend to be large and persistent, interacting directly with the end user and not relying on any "features" of the shell. On the other hand, the shells that come with UNIX-like operating systems include a lot of useful functionality beyond invoking programs, and programming them is more like programming in a functional language like C. The application programs tend to be small, organized as building blocks with relatively little direct interaction with the user. The point is, you're free to pick the shell you like, pretty much on any operating system, that implements the philosophy you prefer. Or create your own. > Any competent application that is intended to run across platforms > wouldn't make direct OS calls anyway. You use some kind of abstraction > layer that presents the model your app wants to see. That layer is > rewritten per OS to convert from the native interface to your portable > interface. Well, any modern OS, including Windows, already offers a choice of portable API layers. If you stick with POSIX, you can run on any *ix or Windows platform (and a lot of others). If you like the "native" Windows API, you can run on *ix, for example, by using an adaptation layer like Wine. I know you like the level of control you get by inventing and implementing your own API layer, but that isn't really the best choice for most programmers. -- Dave Tweed -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist