1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-30 19:20:53 +02:00

zsh-workers/8033

This commit is contained in:
Tanaka Akira 1999-09-23 14:30:25 +00:00
parent c212ee5b06
commit e504499d98
2 changed files with 4 additions and 3 deletions

View file

@ -86,13 +86,14 @@ if the var(args) is used as a string or a comma-separated list of
arithmetic expressions. The shell currently defines no mathematical arithmetic expressions. The shell currently defines no mathematical
functions, but modules may define some. functions, but modules may define some.
An expression of the form `tt(#\)var(x)' where var(x) is any character An expression of the form `tt(##)var(x)' where var(x) is any character
sequence such as `tt(a)', `tt(^A)', or `tt(\M-\C-x)' gives the ascii sequence such as `tt(a)', `tt(^A)', or `tt(\M-\C-x)' gives the ascii
value of this character and an expression of the form `tt(#)var(foo)' value of this character and an expression of the form `tt(#)var(foo)'
gives the ascii value of the first character of the value of the gives the ascii value of the first character of the value of the
parameter var(foo). Note that this is different from the expression parameter var(foo). Note that this is different from the expression
`tt($#)var(foo)', a standard parameter substitution which gives the `tt($#)var(foo)', a standard parameter substitution which gives the
length of the parameter var(foo). length of the parameter var(foo). `tt(#\)' is accepted instead of
`tt(##)', but its use is deprecated.
Named parameters and subscripted arrays can be referenced by name within an Named parameters and subscripted arrays can be referenced by name within an
arithmetic expression without using the parameter expansion syntax. For arithmetic expression without using the parameter expansion syntax. For

View file

@ -374,7 +374,7 @@ zzlex(void)
return NUM; return NUM;
} }
if (*ptr == '#') { if (*ptr == '#') {
if (*++ptr == '\\') { if (*++ptr == '\\' || *ptr == '#') {
int v; int v;
ptr++; ptr++;