From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22250 invoked from network); 17 Mar 2001 17:10:44 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 17 Mar 2001 17:10:44 -0000 Received: (qmail 19250 invoked by alias); 17 Mar 2001 17:10:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13656 Received: (qmail 19238 invoked from network); 17 Mar 2001 17:10:33 -0000 From: "Bart Schaefer" Message-Id: <1010317171018.ZM6851@candle.brasslantern.com> Date: Sat, 17 Mar 2001 17:10:18 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: ARGC (and other readonly specials) and "local" MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii This is 4.0.1-pre-2: zsh% ARGC=0 zsh: read-only variable: ARGC zsh% argc () { echo $ARGC; local -i ARGC; ARGC=0; echo $ARGC } zsh% argc a b c 3 3 So even though I can make it local and thereby not read-only, it still behaves as if it were read-only. This is of course what "local -h" is for. However: zsh% argc () { echo $ARGC; local -Z3 ARGC; ARGC=0; echo $ARGC } zsh% argc a b c argc:local: ARGC: can't change type of a special parameter If I can't change any other attributes, why should I be able to change readonly? BTW, I found this interesting: zsh% typeset -i2 ARGC zsh% echo $ARGC 2#0 So *some* attributes can change, even of readonly parameters. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net