Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: function variables question
- X-seq: zsh-users 1582
- From: Zefram <zefram@xxxxxxxxx>
- To: luomat+Lists/Zsh/users@xxxxxxxxxxxxxxx (Timothy J Luoma)
- Subject: Re: function variables question
- Date: Mon, 8 Jun 1998 10:37:38 +0100 (BST)
- Cc: zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: <199806072133.RAA00849@xxxxxxxxxxxxxxx> from "Timothy J Luoma" at Jun 7, 98 05:33:15 pm
Timothy J Luoma wrote:
>I tend to use the same variable names in a lot of functions, such as 'name='
>or 'short=' or 'for i in '
>
>Should I be doing 'unset name ; unset short ; unset i' at the end of them,
>to keep them from interfering with each other?
No. You should be doing 'local name', etc., at the start of the function,
to stop them interfering with anything else.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author