Thread overview
Escape sequence request
Mar 24, 2004
Dn7
Mar 24, 2004
Walter
Mar 24, 2004
Dn7
Mar 24, 2004
Andy Friesen
Mar 24, 2004
Dn7
Mar 25, 2004
Andy Friesen
Mar 25, 2004
Dn7
Mar 24, 2004
Walter
March 24, 2004
Add \e in string escapes, it should do the same as \x[escape key hex].


March 24, 2004
"Dn7" <Dn7_member@pathlink.com> wrote in message news:c3sok9$q5c$1@digitaldaemon.com...
> Add \e in string escapes, it should do the same as \x[escape key hex].

What's the rationale?


March 24, 2004
In article <c3st6d$128s$2@digitaldaemon.com>, Walter says...
>
>
>"Dn7" <Dn7_member@pathlink.com> wrote in message news:c3sok9$q5c$1@digitaldaemon.com...
>> Add \e in string escapes, it should do the same as \x[escape key hex].
>
>What's the rationale?
>
>
It is also used by C/C++, and they're common to use for writing attributes to the console. I don't think it would take a lot of effort adding it ;)


March 24, 2004
Dn7 wrote:
> It is also used by C/C++, and they're common to use for writing attributes to
> the console. I don't think it would take a lot of effort adding it ;)

\033 isn't that hard to type, is it?

 -- andy
March 24, 2004
"Dn7" <Dn7_member@pathlink.com> wrote in message news:c3t4ug$1fh9$1@digitaldaemon.com...
> In article <c3st6d$128s$2@digitaldaemon.com>, Walter says...
> >"Dn7" <Dn7_member@pathlink.com> wrote in message news:c3sok9$q5c$1@digitaldaemon.com...
> >> Add \e in string escapes, it should do the same as \x[escape key hex].
> >What's the rationale?
> It is also used by C/C++, and they're common to use for writing attributes
to
> the console. I don't think it would take a lot of effort adding it ;)

It's non-standard for both C and C++, and since it's redundant, I'm reluctant to add it.


March 24, 2004
In article <c3t5e2$1g6j$1@digitaldaemon.com>, Andy Friesen says...
>
>Dn7 wrote:
>> It is also used by C/C++, and they're common to use for writing attributes to the console. I don't think it would take a lot of effort adding it ;)
>
>\033 isn't that hard to type, is it?
>
>  -- andy
case 'e': return '\033'; break; isn't either.


March 25, 2004
In article <c3t5e2$1g6j$1@digitaldaemon.com>, Andy Friesen says...
>
>Dn7 wrote:
>> It is also used by C/C++, and they're common to use for writing attributes to the console. I don't think it would take a lot of effort adding it ;)
>
>\033 isn't that hard to type, is it?
>
>  -- andy

Let me check. \033. Still, how hard would it be making \e.


March 25, 2004
Dn7 wrote:
> case 'e': return '\033'; break; isn't either.

It's not so much a matter of it being easy as a matter of it not at all being necessary.

A frequently useful construction that is difficult to replicate with the language as it stands is a good candidate for inclusion  A minor piece of syntactic sugar that saves two keystrokes and will rarely see use is not.

 -- andy