From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21603 invoked from network); 3 Dec 1998 21:29:30 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 3 Dec 1998 21:29:30 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id QAA02056; Thu, 3 Dec 1998 16:28:41 -0500 (EST) Resent-Date: Thu, 3 Dec 1998 16:28:36 -0500 (EST) To: zsh-users@math.gatech.edu Path: mason From: mason@primenet.com.au (Geoff Wing) Newsgroups: lists.zsh.users Subject: Re: counting in "for" loops Date: 3 Dec 1998 21:27:25 GMT Organization: PrimeNet Computer Consultants Message-ID: References: ; from "Geoff Wing" on Thu 3 Dec 1998 (4:22 +0000) <19981203212653.56779@athenaeum.demon.co.uk> Reply-To: mason@primenet.com.au NNTP-Posting-Host: coral.primenet.com.au X-Trace: coral.primenet.com.au 912720445 21541 203.43.15.2 (3 Dec 1998 21:27:25 GMT) X-Complaints-To: usenet@coral.primenet.com.au NNTP-Posting-Date: 3 Dec 1998 21:27:25 GMT User-Agent: slrn/0.9.5.4 (UNIX) Resent-Message-ID: <"D5V97.0.RV.4AmPs"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1958 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Phil Pennock typed: :Typing away merrily, Geoff Wing produced the immortal words: :> like and use it. It's not as if there aren't a few choices. For starters: :Mostly just variants on a theme. With the problem that they all look to :produce: :12345678910 (with no newline) Yes, my mistake. I blindly whacked -n on the echo. :% ( local foo; set -A foo {1..10} ; print $foo ) :% ( local foo; print ${(A)foo::={1..10}} ) :Handle it, without the trailing space of another suggestion. :I wanted: :% print ${(A)_::={1..10}} :which would nicely leave $_ with the values, but _ is a readonly :variable. *sigh* Either way, you're not left with only one option. -- Geoff Wing Mobile : 0412 162 441 Work URL: http://www.primenet.com.au/ Ego URL: http://pobox.com/~gcw/