To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.nqcOpen lugnet.robotics.rcx.nqc in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / NQC / 392
391  |  393
Subject: 
Re: NQC 2.1 b2 in beta test
Newsgroups: 
lugnet.robotics.rcx.nqc
Date: 
Sun, 16 Jan 2000 21:49:58 GMT
Viewed: 
1840 times
  
Uwe Denzer wrote:

Dave Baum wrote:

If there are 2n+1 backslashes, then it is interpreted as n backslashes and
the quote becomes part of the arg (and the quoting state remains
unchanged)

If anyone knows the "official" rules here, please let me know.

Unfortunately, I don't know "official" rules nor did I find a place where to
look them up.

Nevertheless, I can only think that this whole escaping stuff is not compliant
with normal, expected Win32 behavior. The backslash is the standard character
for paths, and the doublequote is standard for embracing long filenames since
Win32. So, it makes hardly any sense to define just that backslash as the
escape character, where forms like "....\" really appear frequently in the
DOS/Win32 world. In other words: I am pretty sure (although can't prove it)
that using the backslash as an escape character is incorrect under Win32.

You are wrong. The precedent, naturally, is C, coz NQC, isn't quite,
err, C. Backslash _is_ the escaping character in C, even on Windoze. So,
to write \a\b\c as a correct C string (yes, even a VC++ one), you have
to write "\\a\\b\\c", and if you want to use UNC it gets worse, e.g.
"\\\\yourmachine\\mount\\a\\b\\c".

Of course, the whole use of \ is a completely lame attempt to pretend
that its somehow different from the real standard of / for path
component separation, so all known versions of C on Windoze will
actually let you use those instead, so you can write the above two
examples as "/a/b/c" and "//yourmachine/mount/a/b/c", which is the way
God (i.e. K, R and T) intended it anyway.

Cheers,

Ben.

--
SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm

http://www.apache-ssl.org/ben.html

"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
     - Indira Gandhi



Message has 1 Reply:
  Re: NQC 2.1 b2 in beta test
 
(...) I don't deny that this is the way C does it. But nevertheless, when you pass parameters *on the Win command line*, shouldn't you follow the behavior that is de-facto standard (even if "incorrect" from a C view) for *that* OS, irresepective of (...) (25 years ago, 16-Jan-00, to lugnet.robotics.rcx.nqc)

Message is in Reply To:
  Re: NQC 2.1 b2 in beta test
 
(...) Unfortunately, I don't know "official" rules nor did I find a place where to look them up. Nevertheless, I can only think that this whole escaping stuff is not compliant with normal, expected Win32 behavior. The backslash is the standard (...) (25 years ago, 16-Jan-00, to lugnet.robotics.rcx.nqc)

25 Messages in This Thread:







Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR