From 383ea67ea46d335e0bd8b78168cd44c8bd56f6eb Mon Sep 17 00:00:00 2001 From: Drazen Borkovic Date: Sun, 27 Aug 2017 12:49:03 -0700 Subject: Change one continue-testing loop from for to while --- trip.rc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 } -- cgit v1.2.3