[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.2.0 (rc7) now available
- From: Jerome Vuarand <jerome.vuarand@...>
- Date: Thu, 8 Dec 2011 15:36:22 +0100
2011/12/8 Lorenzo Donati <firstname.lastname@example.org>:
> Running the test suite with:
> ..\src\lua -e"_U=true" all.lua
> was ok, but note that I had to change single quotes into double quotes.
> When using (as suggested in http://www.lua.org/tests/5.2/):
> ..\src\lua -e'_U=true' all.lua
> with XP command prompt I got the error:
> ..\src\lua: (command line):1: unexpected symbol near ''_U=true''
That's because of the way the C runtime library splits command line
and handles quoting. Contrary to Unix, the Windows command lines are
passed as a single string to the called process, and the C runtime
library is splitting it into argc and argv. The C runtime library
you're using seems not to handle single quotes like you expect. If
it's anything like CommandLineToArgcW function  (which I believe
the MSVC libc is calling), it only treats double quotes specially and
pass single quotes unchanged (and the string [[ '_U=true' ]] is not
valid Lua code).