This repository is for tutorials of Eos.
Revision | bbf719bea360ddf864bd3cb9960c14edb0f46544 (tree) |
---|---|
Time | 2015-01-14 11:07:58 |
Author | kinoshita-eos <kinoshita@yasu...> |
Commiter | kinoshita-eos |
Add: PIONE tutorial about constraint.
new file: SampleCode/PIONE/Basic7/EvenOdd3.pione
@@ -0,0 +1,22 @@ | ||
1 | +param $val := 123 | |
2 | + | |
3 | +Rule Main | |
4 | + output 'message.txt' | |
5 | +Flow | |
6 | + rule Even | |
7 | + rule Odd | |
8 | +End | |
9 | + | |
10 | +Rule Even | |
11 | + output 'message.txt' | |
12 | + constraint $val % 2 == 0 | |
13 | +Action | |
14 | + echo "{$val} is even." > {$O[1]}; | |
15 | +End | |
16 | + | |
17 | +Rule Odd | |
18 | + output 'message.txt' | |
19 | + constraint $val % 2 == 1 | |
20 | +Action | |
21 | + echo "{$val} is odd." > {$O[1]}; | |
22 | +End | |
\ No newline at end of file |