summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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__
+}