Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: local arrays
- X-seq: zsh-users 2017
- From: Phil Pennock <comet@xxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxxxxxxx>
- Subject: Re: local arrays
- Date: Wed, 13 Jan 1999 16:58:07 +0000
- In-reply-to: <990113081507.ZM17393@xxxxxxxxxxxxxxxxxxxxxxx>; from "Bart Schaefer" on Wed 13 Jan 1999 (8:15 -0800)
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxxxxxxxxxx>
- Organisation: Organisation? Here? No, over there ---->
- References: <19990113101208.A6023@xxxxxxxx> <990113081507.ZM17393@xxxxxxxxxxxxxxxxxxxxxxx>
Typing away merrily, Bart Schaefer produced the immortal words:
> On Jan 13, 10:12am, Phil Pennock wrote:
> } Is there a way in zsh-3.0.5 (or zsh-3.1.x) to use one command to declare
> } a variable to be both local and an array?
>
> No, there isn't. This is even documented, poorly (a bit better in pws-4,
> because it was part of my rewrite of the `typeset' documentation).
>
> Why do you need to do this? The variable will assume array-ness upon the
> first array assignment to it.
Cleanliness. Obviousness of purpose.
The scripts I write are liable to be modified by others. So the purpose
of stuff should be clear. Nice clean explicit statements of what a
variable is help. So integers get declared as such, etc. And if that
adds type-checking, all the better.
I just prefer zsh to perl ...
--
--> Phil Pennock ; GAT d- s+:+ a23 C++(++++) UL++++/I+++/S+++/H+ P++@ L+++
E-@ W(+) N>++ o !K w--- O>+ M V !PS PE Y+ PGP+ t-- 5++ X+ R !tv b++>+++ DI+ D+
G+ e+ h* r y?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author