command_line() bug in ex.exe 2.4

new topic     » topic index » view thread      » older message » newer message

Hello Rob, hello all,

I ran the following small test program on Windows 98:
-- program 'cmd.ex'
constant CMD = command_line()
for i = 3 to length(CMD) do
   puts(1, "-" & CMD[i] & "-\n")
end for
if getc(0) then end if


a) When calling it like this:
      exw.exe cmd.ex "c:\long dirname\"
   it displays, as I expected:
      -c:\long dirname\-

b) But when calling it like this:
      ex.exe cmd.ex "c:\long dirname\"
   it displays:
      -c:\long dirname"-

   It might look as if the backslash acts as an escape character here.
   But I think this isn't true, because in that case the first backslash
   should cause an error. Also, this should be consistent on all
   supported platforms IMHO.
   Calling
      ex.exe cmd.ex "c:\long dirname\\"
   displays
      -c:\long dirname\"-

   In order to achieve the desired result, I have to omit the second
   double quote character:
      ex.exe cmd.ex "c:\long dirname\
   displays
      -c:\long dirname\-

   Calling
      ex.exe cmd.ex "c:\long dirname\" "d:\long dirname\"
   displays
      -c:\long dirname" -
      -d:\long-
      -dirname"-

Regards,
   Juergen

-- 
A: Because it considerably reduces the readability of the text.
Q: Why?
A: Top posting.
Q: What is annoying in e-mail and news?

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu