Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Unexpected behavior of P parameter expansion flag inside arithmetic evaluation
- X-seq: zsh-workers 29695
- From: Nikolai Weibull <now@xxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxx>
- Subject: Unexpected behavior of P parameter expansion flag inside arithmetic evaluation
- Date: Wed, 17 Aug 2011 11:10:20 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=wQ+3N9U+V12+856zS6OHfzs1PRjZXwMJqMPdTTB7iW0=; b=HLhXtVOnvmosMtTEAWRvYBGIE1i340Zow1k0OyYxhimqy3ApwyTL8djw4iLv/c2lVH bHP6nv2+rwqc70wB+sgMERi9JBL9hL8YrvazkkfvtjqDJu7MOhTL911zRPenjefmHvJF oUh/M1vPwPKSliHVTWzdBjgSWrubd8nc9/5MI=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Sender: nikolai.weibull@xxxxxxxxx
% a=(abc)
% (( r = $#a )); echo $r
1
% b=a
% (( r = ${#${(P)b}} )); echo $r
3
% (( r = ${#${(P@)b}} )); echo $r
1
Why is the ‘@’ needed in this case?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author