From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3e18ac1ed3cec38e7911b3a44d94dc94@quanstro.net> From: erik quanstrom Date: Sun, 6 Aug 2006 01:04:22 -0500 To: 9fans@cse.psu.edu Subject: Re: [9fans] rc break In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Topicbox-Message-UUID: 97c1b9c2-ead1-11e9-9d60-3106f5b1d025 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. =E2=98=BA 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 >=20 > # figure out what day we have by subtraction > j =3D (Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec) > c =3D () > mon =3D () > for (i in 31 $feb 31 30 31 30 31 31 30 31 30 31) > if (~ $#mon 0) { > c =3D ($c 1) > if (expr $i '>' $d >/dev/null) > mon =3D $#c > if not > d =3D `{expr $d - $i} > } >=20 > The lack of break may require recasting the form of a script.