• R/O
  • HTTP
  • SSH
  • HTTPS

tutorial: Commit

This repository is for tutorials of Eos.


Commit MetaInfo

Revisionace6f6f42c677fd2598120227dc8952dd269d542 (tree)
Time2015-01-09 15:46:46
Authorkinoshita-eos <kinoshita@yasu...>
Commiterkinoshita-eos

Log Message

Add: PIONE tutorial to improve Loop Statement.
new file: SampleCode/PIONE/Basic11/LoopTouch.pione
new file: SampleCode/PIONE/Basic11/LoopTouch2.pione

Change Summary

Incremental Difference

--- /dev/null
+++ b/SampleCode/PIONE/Basic11/LoopTouch.pione
@@ -0,0 +1,24 @@
1+param $max := 64
2+
3+Rule Main
4+ output '*.txt'
5+Flow
6+ rule LoopSystem {val: 0}
7+End
8+
9+Rule LoopSystem
10+ output '*.txt'
11+ param $val
12+Flow
13+ rule Test {val: $val}
14+ if ($val + 1) <= $max
15+ rule LoopSystem {val: $val + 1}
16+ end
17+End
18+
19+Rule Test
20+ output '{$val}.txt'
21+ param $val
22+Action
23+ touch {$O[1]}
24+End
\ No newline at end of file
--- /dev/null
+++ b/SampleCode/PIONE/Basic11/LoopTouch2.pione
@@ -0,0 +1,27 @@
1+param $max := 64
2+
3+Rule Main
4+ output '*.txt'
5+Flow
6+ rule LoopSystem {val: 0}
7+End
8+
9+Rule LoopSystem
10+ output '*.txt'
11+ param $val
12+Flow
13+ rule Test {val: $val}
14+ if (($val * 2) + 1) <= $max
15+ rule LoopSystem {val: ($val * 2) + 1}
16+ end
17+ if (($val * 2) + 2) <= $max
18+ rule LoopSystem {val: ($val * 2) + 2}
19+ end
20+End
21+
22+Rule Test
23+ output '{$val}.txt'
24+ param $val
25+Action
26+ touch {$O[1]}
27+End
\ No newline at end of file
Show on old repository browser