diff options
Diffstat (limited to '2.3-1/tests/unit_tests/test024_test_if_pi')
-rw-r--r-- | 2.3-1/tests/unit_tests/test024_test_if_pi/launchConversion.sci | 5 | ||||
-rw-r--r-- | 2.3-1/tests/unit_tests/test024_test_if_pi/scilabcode/mainfunction.sci | 24 |
2 files changed, 29 insertions, 0 deletions
diff --git a/2.3-1/tests/unit_tests/test024_test_if_pi/launchConversion.sci b/2.3-1/tests/unit_tests/test024_test_if_pi/launchConversion.sci new file mode 100644 index 00000000..41be0f04 --- /dev/null +++ b/2.3-1/tests/unit_tests/test024_test_if_pi/launchConversion.sci @@ -0,0 +1,5 @@ +lines(0)
+clear all
+tmpPWD = pwd;
+
+scilab2c(pwd()+"/scilabcode/mainfunction.sci", pwd(), pwd()+"/scilabcode/");
diff --git a/2.3-1/tests/unit_tests/test024_test_if_pi/scilabcode/mainfunction.sci b/2.3-1/tests/unit_tests/test024_test_if_pi/scilabcode/mainfunction.sci new file mode 100644 index 00000000..6b1652fd --- /dev/null +++ b/2.3-1/tests/unit_tests/test024_test_if_pi/scilabcode/mainfunction.sci @@ -0,0 +1,24 @@ +//SCI2C: DEFAULT_PRECISION= DOUBLE
+ +function mainfunction()
+ +a=%pi*70; +b=1; +c=0;
+M = (1:3)'*(1:5) +if a<=1 + c=b; + disp(c)
+else + if b==10 + c=5; + disp(c) + else + c=2; + disp(c)
+ S = c.^M;
+ disp(S);
+ disp(a) + end +end +endfunction
|