zsh-users
 help / color / mirror / code / Atom feed
From: mason@primenet.com.au (Geoff Wing)
To: zsh-users@math.gatech.edu
Subject: Re: counting in "for" loops
Date: 3 Dec 1998 21:27:25 GMT	[thread overview]
Message-ID: <slrn76e0ht.l14.mason@coral.primenet.com.au> (raw)
In-Reply-To: <19981203212653.56779@athenaeum.demon.co.uk>

Phil Pennock <phil@athenaeum.demon.co.uk> 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   <gcw@pobox.com>            Mobile : 0412 162 441
Work URL: http://www.primenet.com.au/   Ego URL: http://pobox.com/~gcw/


  reply	other threads:[~1998-12-03 21:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-02 16:00 Sven Guckes
1998-12-02 16:16 ` Thomas Koehler
1998-12-02 16:21   ` Peter Stephenson
1998-12-03  3:15     ` Updating documentation (Re: counting in "for" loops ) Timothy J Luoma
1998-12-02 16:50 ` counting in "for" loops Bruce Stephens
1998-12-03  4:22 ` Geoff Wing
1998-12-03 21:26   ` Phil Pennock
1998-12-03 21:27     ` Geoff Wing [this message]
1998-12-04 15:53     ` Phil Pennock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=slrn76e0ht.l14.mason@coral.primenet.com.au \
    --to=mason@primenet.com.au \
    --cc=zsh-users@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).