summaryrefslogtreecommitdiff
path: root/trip.rc
diff options
context:
space:
mode:
authorDrazen Borkovic <borkovic@users.noreply.github.com>2017-08-27 12:49:03 -0700
committerDrazen Borkovic <borkovic@users.noreply.github.com>2017-08-27 12:49:03 -0700
commit383ea67ea46d335e0bd8b78168cd44c8bd56f6eb (patch)
treef2634a9dc2d268e92b05d376dd0d411eeb58829a /trip.rc
parent292f79d2715d0e7cdcc0836f6f26ef56967c5f11 (diff)
Change one continue-testing loop from for to while
Diffstat (limited to 'trip.rc')
-rw-r--r--trip.rc6
1 files changed, 5 insertions, 1 deletions
diff --git a/trip.rc b/trip.rc
index 585e6be..6a42350 100644
--- a/trip.rc
+++ b/trip.rc
@@ -605,14 +605,18 @@ q=''''
C=$q^while-continue$q
L=()
+save_star = *
ten = a^(1 2 3 4 5 6 7 8 9 10)
* = $ten
-for (n) {
+while (! ~ $#* 0) {
+ n = $1; shift
if (~ $n a2 a3) {
continue
}
L=($L $n)
}
+* = $save_star; save_star = ()
+
if (!~ $#L 8) {
fail Wrong length of list from $C: $#L
}