From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] rc break
Date: Sat, 5 Aug 2006 23:25:06 -0500 [thread overview]
Message-ID: <68947f82dd2ff93603d7352019e90b28@quanstro.net> (raw)
In-Reply-To: <44D506BB.2010901@asgaard.homelinux.org>
well, td knows more than i, but doesn't this code look ugly without the
benefit of a break statement?
fn parseargs { endarg = '' {
while(! ~ $#argv 0){
switch($argv(1)^$endarg){
case -r
earf r usage
case -f
earf f usage
case *
endarg = y
cmd = ($cmd $argv(1))
Shift argv
}
}
}}
wouldn't this be better
fn parseargs {
while(! ~ $#argv 0){
switch($argv(1)){
case -r
earf r usage
case -f
earf f usage
case *
break;
}
}
cmd = $argv;
}
On Sat Aug 5 16:01:54 CDT 2006, noselasd@asgaard.homelinux.org wrote:
> erik quanstrom wrote:
> > is there some reason that rc has no "break" statement?
> The rc paper has some notes on this :
>
> "... I deleted the builtins export, readonly, break, continue, read,
> return, set, times and unset because they seem redundant or only
> marginally useful."
>
> > for example:
> >
> > for(i in $fu){
> > ...
> > if(endcond)
> > break;
> > }
> >
> > - erik
>
next prev parent reply other threads:[~2006-08-06 4:25 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 [this message]
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
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=68947f82dd2ff93603d7352019e90b28@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).