OSDN Git Service

Add: tutorial for PIONE about case statement. v2.0.2p0072
authorkinoshita-eos <kinoshita@yasunaga-lab.bio.kyutech.ac.jp>
Wed, 3 Dec 2014 00:12:45 +0000 (09:12 +0900)
committerkinoshita-eos <kinoshita@yasunaga-lab.bio.kyutech.ac.jp>
Wed, 3 Dec 2014 00:12:45 +0000 (09:12 +0900)
new file:   SampleCode/PIONE/Basic7/EvenOdd2.pione

SampleCode/PIONE/Basic7/EvenOdd2.pione [new file with mode: 0644]

diff --git a/SampleCode/PIONE/Basic7/EvenOdd2.pione b/SampleCode/PIONE/Basic7/EvenOdd2.pione
new file mode 100644 (file)
index 0000000..11b6e4a
--- /dev/null
@@ -0,0 +1,24 @@
+param $val := 123
+
+Rule Main
+       output 'message.txt'
+Flow
+       case $val % 2
+       when 0
+               rule Even
+       else
+               rule Odd
+       end
+End
+
+Rule Even
+       output 'message.txt'
+Action
+       echo "{$val} is even." > {$O[1]};
+End
+
+Rule Odd
+       output 'message.txt'
+Action
+       echo "{$val} is odd." > {$O[1]};
+End
\ No newline at end of file