From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7940 invoked by alias); 10 Nov 2010 18:02:13 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 28407 Received: (qmail 17065 invoked from network); 10 Nov 2010 18:02:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <101110100157.ZM6378@torch.brasslantern.com> Date: Wed, 10 Nov 2010 10:01:57 -0800 In-reply-to: <4CDAD6BA.1020902@redhat.com> Comments: In reply to Eric Blake "Re: static vs. dynamic scoping" (Nov 10, 10:30am) References: <4CD9C64E.8060307@redhat.com> <101110092252.ZM6257@torch.brasslantern.com> <4CDAD6BA.1020902@redhat.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Eric Blake Subject: Re: static vs. dynamic scoping Cc: zsh-workers@zsh.org MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Nov 10, 10:30am, Eric Blake wrote: > > I'm not that familiar with ksh93; you'd have to ask David Korn for > precise details. But my understanding is that with static scoping, > every variable reference which was not explicitly declared local is > inherently global, because there are no other scopes to worry about. Right, and that works fine for simple assignments and for expansion. I'm curious about what happens when you want to declare something not-static but also not a simple scalar, e.g. f() { # Is there any way to make these global? typeset -i4 an_int typeset -u all_upper }