From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] rc break
Date: Sun, 6 Aug 2006 01:04:22 -0500 [thread overview]
Message-ID: <3e18ac1ed3cec38e7911b3a44d94dc94@quanstro.net> (raw)
In-Reply-To: <a2e22d20b8b11ab3829bdaf4b9166a33@plan9.bell-labs.com>
sure. but that's a bit counterintutitive, isn't it? the loop continues
looping without doing anything. but i should talk,
i'm using c to count scheme-style. ☺
is break really that broken? because of the lack of break,
you see some rc code that looks like it was written for a class with an
expansive no-goto edict. ;-)
- erik
On Sat Aug 5 19:51:13 CDT 2006, geoff@plan9.bell-labs.com wrote:
> One could rewrite the example script as
>
> # figure out what day we have by subtraction
> j = (Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)
> c = ()
> mon = ()
> for (i in 31 $feb 31 30 31 30 31 31 30 31 30 31)
> if (~ $#mon 0) {
> c = ($c 1)
> if (expr $i '>' $d >/dev/null)
> mon = $#c
> if not
> d = `{expr $d - $i}
> }
>
> The lack of break may require recasting the form of a script.
next prev parent reply other threads:[~2006-08-06 6:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-05 15:39 erik quanstrom
2006-08-05 20:59 ` "Nils O. Selåsdal"
2006-08-06 4:25 ` erik quanstrom
2006-08-05 23:42 ` geoff
2006-08-06 5:18 ` erik quanstrom
2006-08-06 0:50 ` geoff
2006-08-06 6:04 ` erik quanstrom [this message]
2009-05-12 1:52 erik quanstrom
2009-05-12 5:08 ` Uriel
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=3e18ac1ed3cec38e7911b3a44d94dc94@quanstro.net \
--to=quanstro@quanstro.net \
--cc=9fans@cse.psu.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.
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).