Re: DOS Options



"Adam Beneschan" <adam@xxxxxxxxxx> wrote in message
news:4c374a25-562c-4b8e-9770-07868bd88f15@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Dec 19, 2:59 pm, "Randy Brukardt" <ra...@xxxxxxxxxxxxxx> wrote:
"Gautier" <gaut...@xxxxxxxxxxxxxxx> wrote in message

news:476973a3$1_5@xxxxxxxxxxxxxxxxxx
...

Your 3.15p is certainly the Windows version, and what you are seeing
is a
Win32
console output. Indeed, you need to congratulate Microsoft which
decided
to
parse and separate the arguments in Win32 in a fashion consistent with
DOS -
adding the parsing of filenames containing spaces, enclosed by "".
Ada.Command_Line.Argument(i) just gives the "ith" argument from the
system, as
the system wants to give it, that's it.

I have no idea what you are talking about. Both MS-DOS and Win32 only
provide a single string as the result of the command line -- the system
provides no parsing whatsoever. For Win32, the function is
GetCommandLine.
In DOS, you had to grab the string from the memory of your executable
process -- there isn't even a function to get it.

Windows does appear to have a CommandLineToArgvW function that parses
the command line (or whatever string you give it). I don't know
whether GNAT uses it. I'm pretty sure that not all C compilers use
it---the MINGW32 version, I believe, does its own parsing, in whatever
startup routine is linked into the program before main() is called.

Fascinating; never noticed that one. I doubt anything much uses it, though,
because it isn't supported on Windows 95/98/ME, so any compiler runtime that
used it would have to be almost brand-new. (It would have been nasty to make
programs that don't run on older Windows systems just to use a function that
is easy to write yourself. Not as big of an issue today, but I doubt
compiler vendors are rewriting their runtime to purposely break something
that previously worked!)

Randy.


.



Relevant Pages

  • Re: Bug/problem with lcc-win
    ... layer or through using a sufficiently old version of win32, ... which is a 16 bit DOS emulation mode (which does ... Who writes a Win32 compiler and is ... unfamiliar with the basic execution modes of Windows? ...
    (comp.lang.c)
  • Re: What is the benefit to me of .NET as an end-user?
    ... Even in Windows, there are multiple platforms. ... vs Win CE (a subset of Win32). ... Also, most would consider the browser a different platform than Win32, ... compiler converts it to native machine instructions. ...
    (borland.public.delphi.non-technical)
  • Re: Star Commander for Windows?
    ... 64-bit Windows that has no DOS shell anymore :-. ... command to mount a few directories as virtual drives. ... XP64 doesn't even run 32 bit natively, it goes through an emulator that is actually a better Win32 than real Win32. ... If you're still writing and selling 16-bit windows or dos applications, you probably need to take a good hard look at your business model. ...
    (comp.sys.cbm)
  • Re: Preprocessor Directives
    ... a compiler that predefines WIN32 (without ... specified in the command line. ... The conformance of a compiler is highly ...
    (comp.lang.c)
  • Re: options in the file SOURCES .wince4.2 wince5
    ... Windows CE 6.0 help describes the unique and shared ... I use BUILD.exe to general a prj file,the build.exe complete compiler ... the assembler and linker documentation to since ADEFINES and LDEFINES ... flags / command line options for those tools. ...
    (microsoft.public.windowsce.platbuilder)