OSDN Git Service

Add: PIONE tutorial about Sequence Method(or). v2.0.2p0087
authorkinoshita-eos <kinoshita@yasunaga-lab.bio.kyutech.ac.jp>
Fri, 16 Jan 2015 00:29:17 +0000 (09:29 +0900)
committerkinoshita-eos <kinoshita@yasunaga-lab.bio.kyutech.ac.jp>
Fri, 16 Jan 2015 00:29:17 +0000 (09:29 +0900)
new file:   SampleCode/PIONE/Basic13/Input/2.txt
new file:   SampleCode/PIONE/Basic13/InputOr.pione
new file:   SampleCode/PIONE/Basic13/OutputOr.pione

SampleCode/PIONE/Basic13/Input/2.txt [new file with mode: 0644]
SampleCode/PIONE/Basic13/InputOr.pione [new file with mode: 0644]
SampleCode/PIONE/Basic13/OutputOr.pione [new file with mode: 0644]

diff --git a/SampleCode/PIONE/Basic13/Input/2.txt b/SampleCode/PIONE/Basic13/Input/2.txt
new file mode 100644 (file)
index 0000000..10d69b2
--- /dev/null
@@ -0,0 +1 @@
+Data2
diff --git a/SampleCode/PIONE/Basic13/InputOr.pione b/SampleCode/PIONE/Basic13/InputOr.pione
new file mode 100644 (file)
index 0000000..8d06540
--- /dev/null
@@ -0,0 +1,6 @@
+Rule Main
+       input '1.txt' or '2.txt' or '3.txt'
+       output 'out.txt'
+Action
+       cp {$I[1]} {$O[1]}
+End
diff --git a/SampleCode/PIONE/Basic13/OutputOr.pione b/SampleCode/PIONE/Basic13/OutputOr.pione
new file mode 100644 (file)
index 0000000..85fc9b3
--- /dev/null
@@ -0,0 +1,13 @@
+param $Mode := 1
+
+Rule Main
+       output 'out1.txt' or 'out2.txt' or 'err.txt'
+Action
+       if [ {$Mode} -eq 1 ] ; then
+               echo "Mode: {$Mode}" > {$O[1].nth(1)}
+       elif [ {$Mode} -eq 2 ] ;then
+               echo "Mode: {$Mode}" > {$O[1].nth(2)}
+       else
+               echo "Error: Mode {$Mode} is not Supported!" > {$O[1].nth(3)}
+       fi
+End