summaryrefslogtreecommitdiffstats
path: root/tests/nonRegression/bug1566.sci
blob: 0dbbd67a9534720e0b60ac816933ee7de81113bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// <-- Non-regression test for bug 1566 -->
//
// <-- Bugzilla URL -->
// http://www.scilab.org/cgi-bin/bugzilla_bug_II/show_bug.cgi?id=1566
//
// <-- Short Description -->
//    TCL_SetVar eats imaginary part
//
//    I know, the man page for TCL_SetVar states that when used with numbers 
//    those numbers must be real. However, the following does not throw an 
//    error:
//
//    -->TCL_SetVar("A",1+%i)
//     ans  =
//
//      T
//
//    I think it should either spit an error, or fully support complex 
//    numbers.
//
//    -->TCL_GetVar("A")
//     ans  =
//
//     1.0000000000
//
//    Imaginary part disappeared! This is true for single complex numbers or 
// ...

// Copyright INRIA
// Scilab Project - Pierre MARECHAL
// Copyright INRIA 2005
// Date : 28 octobre 2005

err = execstr('TCL_SetVar(''A'',1+%i)','errcatch');

if (err== 999) then
	affich_result(%T,1566);
else
	affich_result(%F,1566);
end

lasterror();