-
Notifications
You must be signed in to change notification settings - Fork 570
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-Authored-By: Alvin Yan <aussiroth@users.noreply.github.com> Co-Authored-By: Victor Loh <lohvht@users.noreply.github.com> * #216 - experimenting with using signal variable * #216 - possible solution found use casper.bypass() to count how many steps to teleport to and bypass when a break statement is issued. nice catch @Aussiroth ! * #216 - use teleport marker * #216 - use stricter matching conditions * #216 - more complicated test * #216 - cleaned up to work for break step * #216 - initial implementation of continue doesn't work but don't break existing break test case. * #216 - working version of continue + break * #216 - add infinity constant for looping eg for n from 1 to infinity { echo n } if constant too big, takes very large to build stack before execution. trade-off decided to be 1024
- Loading branch information
Showing
9 changed files
with
191 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
for n from 1 to 10 | ||
{ | ||
echo n | ||
if n equals to 6 | ||
break; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
for n from 1 to 10 | ||
{ | ||
echo n | ||
if n equals to 6 | ||
{ | ||
for k from 80 to 85 | ||
{ | ||
echo k | ||
if k equals to 83 | ||
{ | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
|
||
for cde from 1 to 5 | ||
{ | ||
echo "cde " + cde | ||
} | ||
|
||
for abc from 1 to 5 | ||
{ | ||
echo "abc " + abc | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
for n from 1 to 10 | ||
{ | ||
echo n | ||
if n equals to 6 | ||
{ | ||
for k from 80 to 85 | ||
{ | ||
echo k | ||
if k equals to 83 | ||
{ | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
|
||
for cde from 1 to 5 | ||
{ | ||
echo "cde " + cde | ||
} | ||
|
||
for abc from 1 to 5 | ||
{ | ||
echo "abc " + abc | ||
} | ||
|
||
for n from 30 to 35 | ||
{ | ||
echo n | ||
} | ||
|
||
for k from 20 to 25 | ||
{ | ||
echo k | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
for n from 1 to 10 | ||
{ | ||
echo n | ||
if n equals to 6 | ||
{ | ||
for k from 80 to 85 | ||
{ | ||
echo k | ||
if k equals to 83 | ||
{ | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
|
||
for cde from 1 to 5 | ||
{ | ||
echo "cde " + cde | ||
if cde equals to 3 | ||
break; | ||
} | ||
|
||
for abc from 1 to 5 | ||
{ | ||
if abc equals to 3 | ||
break | ||
echo "abc " + abc | ||
} | ||
|
||
for n from 30 to 35 | ||
{ | ||
echo n | ||
} | ||
|
||
for k from 20 to 25 | ||
{ | ||
echo k | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
for n from 1 to 10 | ||
{ | ||
echo n | ||
if n equals to 6 | ||
{ | ||
for k from 80 to 85 | ||
{ | ||
continue | ||
echo k | ||
if k equals to 83 | ||
{ | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
|
||
for cde from 1 to 5 | ||
{ | ||
echo "cde " + cde | ||
if cde equals to 3 | ||
continue; | ||
} | ||
|
||
for abc from 1 to 5 | ||
{ | ||
if abc equals to 3 | ||
continue | ||
echo "abc " + abc | ||
} | ||
|
||
for n from 30 to 35 | ||
{ | ||
echo n | ||
} | ||
|
||
for k from 20 to 25 | ||
{ | ||
echo k | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
for n from 1 to 10 | ||
{ | ||
if n equals to 5 | ||
continue | ||
echo n | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
echo infinity | ||
for n from 1 to infinity | ||
{ | ||
echo n | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters