From: Roman Perepelitsa <roman.perepelitsa@gmail.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: zsh-users@zsh.org
Subject: Re: How to have function local variable but must behave just a simple one
Date: Sat, 26 Aug 2023 22:58:27 +0200 [thread overview]
Message-ID: <CAN=4vMoUqVR3p=fQR_anCLiywmmU-vnw4SupZTEzun-X1SxWoA@mail.gmail.com> (raw)
In-Reply-To: <522ad88e-adb2-74a7-103b-62af0f3e7b4e@eastlink.ca>
On Sat, Aug 26, 2023 at 10:39 PM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> On 2023-08-26 13:26, Bart Schaefer wrote:
> > On Sat, Aug 26, 2023 at 12:34 AM Roman Perepelitsa
> > <roman.perepelitsa@gmail.com> wrote:
> >> Zsh doesn't have the equivalent. You'll have to use a global parameter.
>
> Why not have a global variable [...]
Indeed, given that in zsh there are no function-scoped parameters that
outlive an invocation of the function, Budi will have to use a global
parameter and take necessary precautions to ensure the name of the
parameter does not clash with other globals.
Roman.
next prev parent reply other threads:[~2023-08-26 20:59 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-26 7:25 Budi
2023-08-26 7:34 ` Roman Perepelitsa
2023-08-26 20:26 ` Bart Schaefer
2023-08-26 20:38 ` Ray Andrews
2023-08-26 20:58 ` Roman Perepelitsa [this message]
2023-08-26 21:10 ` Ray Andrews
2023-08-26 21:13 ` Roman Perepelitsa
2023-08-27 0:50 ` Budi
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='CAN=4vMoUqVR3p=fQR_anCLiywmmU-vnw4SupZTEzun-X1SxWoA@mail.gmail.com' \
--to=roman.perepelitsa@gmail.com \
--cc=rayandrews@eastlink.ca \
--cc=zsh-users@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).