From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from lists.gentoo.org ([140.105.134.102] helo=robin.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1IdNt6-00088E-QU for garchives@archives.gentoo.org; Thu, 04 Oct 2007 10:25:01 +0000 Received: from robin.gentoo.org (localhost [127.0.0.1]) by robin.gentoo.org (8.14.1/8.14.0) with SMTP id l94AExIS017081; Thu, 4 Oct 2007 10:14:59 GMT Received: from mail.marples.name (rsm.demon.co.uk [80.177.111.50]) by robin.gentoo.org (8.14.1/8.14.0) with ESMTP id l94ABglp012163 for ; Thu, 4 Oct 2007 10:11:42 GMT Received: from [10.73.1.31] (uberlaptop.marples.name [10.73.1.31]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by mail.marples.name (Postfix) with ESMTP id 5A89C190038 for ; Thu, 4 Oct 2007 10:58:23 +0100 (BST) Subject: Re: [gentoo-dev] Re: [gentoo-commits] gentoo-x86 commit in x11-libs/qt: ChangeLog qt-4.3.2.ebuild From: Roy Marples To: gentoo-dev@lists.gentoo.org In-Reply-To: <4704B819.5000101@gentoo.org> References: <20071003173803.GX15143@supernova> <1191480544.2542.5.camel@uberpc.marples.name> <4704B819.5000101@gentoo.org> Content-Type: text/plain Organization: Gentoo Date: Thu, 04 Oct 2007 11:11:40 +0100 Message-Id: <1191492700.1099.2.camel@uberlaptop.development.ltl> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-to: gentoo-dev@lists.gentoo.org Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 Content-Transfer-Encoding: 7bit X-Archives-Salt: 9d66138c-0dc2-4afc-8f28-e5c58507b4aa X-Archives-Hash: 1f3429f1c768b6e108a59e74548f57de On Thu, 2007-10-04 at 11:53 +0200, Marijn Schouten (hkBst) wrote: > > See, another use of bash arrays just because you can? > > IFS=- > > set -- ${CHOST} > > spec=$2 > > > > Works fine in bash - and other shells. > > Do I understand correctly that this resets any arguments that might have been > passed to the function this happens to be in? Yes it does. Most people write their functions like so foo() { local this=$1 that=$2 And then use $this and $that for greater clarity. So if they do that then resetting the positional parameters is a non issue as they've already been saved. Thanks Roy -- gentoo-dev@gentoo.org mailing list