Octagon Long Argument Test

This is a test program for the task arguments in Octagon.

Program


---

Hi Octagon

---


prog_vars =

d/count 1

prog_vars.


prog_start =

print "My 1st Program"

pticks 5

/count 0

rdbg 8

cdbg 5

prog_start.


prog_loop =


print "Hi from Octagon. /count"

inc /count


repeat 5 -> print "REP1 count /count"

tg a1|tg a5|d1 1

repeat 5 -> print "REP2 count /count"|tg d1|tg a1|tg a5|inc /count

-- repeat 5 -> tg d1|tg a1|tg a5

-- repeat 5 -> tg a1

repeat 5 -> tg a1|print "1>Time to quit count /count end"


repeat 5 -> print "2>Time to quit count "|tg a5

tg d1

-- Works

repeat 5 -> tg a5|inc /count|print "3>Time to quit count /count end"

-- Works

repeat 5 ->

print "4>Time to quit count /count end"

tg a5

repeat.


-- Arg too long

repeat 5 -> tg a5|inc /count|print "3>VERY LONG ARG Time to quit count /count"|tg d2


-- Arg too long at end.

repeat 5 -> tg a5|tg d2|inc /count|print "3>VERY LONG ARG Time to quit count /count AT END"


-- DOES NOT WORK

repeat 5 ->

print "5>Time /count end"|tg a1

repeat.

-- Does NOT WORK

repeat 5 -> print "6>Time to quit count /count end"|tg a5

tg d2

repeat 4 ->

print "this is repeat 4"

tg a1

repeat.

-- any /count >= 15 -> print "Time to quit count /count end"|exitprog

any /count >= 15 -> print "7>Time to quit count /count end"|tg a5|exitprog

prog_loop.


prog_stop =

print "Prog STOPPED!"

prog_stop.