From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id GAA14144 for ; Wed, 24 Jul 1996 06:00:44 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id PAA17404; Tue, 23 Jul 1996 15:55:46 -0400 (EDT) Resent-Date: Tue, 23 Jul 1996 15:55:46 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960723125651.ZM2868@candle.brasslantern.com> Date: Tue, 23 Jul 1996 12:56:51 -0700 Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.702 02jul96) To: zsh-workers@math.gatech.edu Subject: Misc. "typeset" oddities MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"RIhRe1.0.sF4.2vIzn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1745 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu I used "typeset -U" in a function, and it had the effect of "local". This is pretty confusing. I had to switch to "typeset -xU", which seems really strange because you can't normally export arrays. If a variable is set and then you attempt to add attributes to it with "typeset", sometimes the value of the variable is cleared, and other times it is not. In particular, array variables MUST be set BEFORE you attempt to use "typeset -U" on them; and string variables are cleared if you use "typeset -L" or "typeset -R" on them. There may be other such cases. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern New male in /home/schaefer: >N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"