summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-03-05 17:53:04 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-03-17 02:28:06 (EDT)
commit0911f6ab9a29716d2b476728522b5b37d51391ed (patch)
treea327bab38ca23df726489816e71e177f46f9df1d
parent6e36d30ca8254882766690a5e849986f5c9e1145 (diff)
downloadeggshell-0911f6ab9a29716d2b476728522b5b37d51391ed.zip
eggshell-0911f6ab9a29716d2b476728522b5b37d51391ed.tar.gz
eggshell-0911f6ab9a29716d2b476728522b5b37d51391ed.tar.bz2
research: New "goto" testing script
-rw-r--r--research/goto.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/research/goto.sh b/research/goto.sh
new file mode 100644
index 0000000..4d21ff4
--- /dev/null
+++ b/research/goto.sh
@@ -0,0 +1,37 @@
+f()
+{
+ foo
+ goto c
+a:
+ bar
+ goto b
+b:
+ baz
+c:
+ qux
+ goto a
+}
+
+
+f()
+{
+ __f__(){
+ foo
+ __f_c; return
+ __f_a
+ }
+ __f_a(){
+ bar
+ __f_b; return
+ __f_b
+ }
+ __f_b(){
+ baz
+ __f_c
+ }
+ __f_c(){
+ qux
+ __f_a; return
+ }
+ __f__
+}