• R/O
  • HTTP
  • SSH
  • HTTPS

tutorial: Commit

This repository is for tutorials of Eos.


Commit MetaInfo

Revisionde56586f1bcdeb60db431b8fe4b7aa531c9444d6 (tree)
Time2014-12-03 09:12:45
Authorkinoshita-eos <kinoshita@yasu...>
Commiterkinoshita-eos

Log Message

Add: tutorial for PIONE about case statement.
new file: SampleCode/PIONE/Basic7/EvenOdd2.pione

Change Summary

Incremental Difference

--- /dev/null
+++ b/SampleCode/PIONE/Basic7/EvenOdd2.pione
@@ -0,0 +1,24 @@
1+param $val := 123
2+
3+Rule Main
4+ output 'message.txt'
5+Flow
6+ case $val % 2
7+ when 0
8+ rule Even
9+ else
10+ rule Odd
11+ end
12+End
13+
14+Rule Even
15+ output 'message.txt'
16+Action
17+ echo "{$val} is even." > {$O[1]};
18+End
19+
20+Rule Odd
21+ output 'message.txt'
22+Action
23+ echo "{$val} is odd." > {$O[1]};
24+End
\ No newline at end of file
Show on old repository browser