top of page

Nested Ant Test

This program is to test the ability of Octagon to handle nested ant commands.

Program


---

Nested Ant Test Program 1

This program is to test the ability of Octagon to

handle nested ant commands.

---


prog_vars =

d/a 0

d/b 0

d/c 0

d/run_no 0

prog_vars.


prog_start =

print "Nestedt Ant Test Program"

rdbg 6

prog_start.


prog_loop =


"MMMMMMMMMMM MAIN run /run_no MMMMMMMMMMM"

ant /run_no ->

= 1 -> task1 /run_no

= 2 -> task2 /run_no

= 3 -> task2 /run_no

-> default_task /run_no

ant.

"POST ANT"

inc /run_no

any /run_no > 5 -> exitprog

prog_loop.


task1 /t1_runs 0 =


"ENTER T1"

patdog 1

tg c1

ant /t1_runs ->

= 1 -> "T1 Run 1"

= 2 -> "T1 Run 2"

-> "T1 Defaiult /t1_runs"

ant.

patdog 2

"EXIT T1"

task1.


task2 /t2_runs 0 =

tg c2

"ENTER T2"

ant /t2_runs ->

= 1 -> "T2 Run 1"

= 2 -> "T2 Run 2"

= 3 -> "T2 Run 3"|task3 /t2_runs

-> "T2 Defaiult /t2_runs"

ant.

"EXIT T2"

task2.


task3 /t3_runs 0 =

"ENTER T3"

tg c3


ant /t3_runs ->

= 1 -> "T3 Run 1"

= 2 -> "T3 Run 2"

= 3 -> "T3 Run 3"

-> "T3 Defaiult /t3_runs"

ant.

"EXIT T3"

task3.


default_task /d_run_no 0 =

"ENTER default_task run /d_run_no"

"EXIT default_task run /d_run_no"

default_task.




prog_stop =

-- max /numarray[*] -> /maxnum

-- print "the maximum number is /maxnum"

print "bye"

prog_stop.


---

The peogram should produce this output:


Nestedt Ant Test Program

MMMMMMMMMMM MAIN run 0 MMMMMMMMMMM


ENTER default_task run 0


EXIT default_task run 0


POST ANT

MMMMMMMMMMM MAIN run 1 MMMMMMMMMMM

ENTER T

T1 Run 1

EXIT T1

POST ANT

MMMMMMMMMMM MAIN run 2 MMMMMMMMMMM

ENTER T2

T2 Run 2

EXIT T2

POST ANT

MMMMMMMMMMM MAIN run 3 MMMMMMMMMMM

ENTER T2

T2 Run 3

ENTER T3

T3 Run 3

EXIT T3

EXIT T2

POST ANT

MMMMMMMMMMM MAIN run 4 MMMMMMMMMMM

ENTER default_task run 4

EXIT default_task run 4

POST ANT

MMMMMMMMMMM MAIN run 5 MMMMMMMMMMM

ENTER default_task run 5

EXIT default_task run 5

POST ANT

bye


---



bottom of page