From: Mikael Magnusson <mikachu@gmail.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: zsh-workers@zsh.org
Subject: Re: Numbers with leading _
Date: Tue, 22 Nov 2022 06:07:34 +0100 [thread overview]
Message-ID: <CAHYJk3RsUan6gFD7xeY8x2k=jzJpDWxfnCPj85-+ZKXa3U8mdQ@mail.gmail.com> (raw)
In-Reply-To: <1967742464.5626418.1669048026322@mail.virginmedia.com>
On 11/21/22, Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
>> On 21/11/2022 16:22 Mikael Magnusson <mikachu@gmail.com> wrote:
>> I was playing with extending hasbraces+xpandbraces to allow _ in
>> numbers via zstrtoul_underscore, and noticed that in normal math
>> context, this happens:
>> % echo $(( _1000 ))
>> 0
>> % a=(1 2 3); echo $a[_1]
>>
>
> That's a reference to the variable $_1 (which obviously isn't set).
Aha, that indeed does make sense now, thanks.
% _1000=5
% echo $(( _1000 ))
5
--
Mikael Magnusson
prev parent reply other threads:[~2022-11-22 5:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 16:22 Mikael Magnusson
2022-11-21 16:27 ` Peter Stephenson
2022-11-22 5:07 ` Mikael Magnusson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAHYJk3RsUan6gFD7xeY8x2k=jzJpDWxfnCPj85-+ZKXa3U8mdQ@mail.gmail.com' \
--to=mikachu@gmail.com \
--cc=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).