summaryrefslogtreecommitdiffstats
path: root/scilab/modules/data_structures/tests/nonreg_tests/bug_3459.dia.ref
blob: be3b3d59380c5999002799c6f766db291f99fc69 (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//<-- CLI SHELL MODE -->
// =============================================================================
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2008 - DIGITEO - Allan CORNET
//
//  This file is distributed under the same license as the Scilab package.
// =============================================================================
// <-- Non-regression test for bug 3459 -->
//
// <-- Bugzilla URL -->
// http://bugzilla.scilab.org/show_bug.cgi?id=3459
//
// <-- Short Description -->
// -->l(2).row1(2)=M.row1(1)
// l  =
//  
// list with entries:
//   1: 1
// !--error 246 
// Function not defined for given argument type(s).
function M=%to_e(varargin)
  M = varargin($),
  select varargin(1)
    case 'row2' then
    M.N = M.N(2, eye())
    M.V = M.V(2, eye())
  case 'row1' then
    M.N = M.N(1, eye())
    M.V = M.V(1, eye())
  else
    M.N = M.N(varargin(1:$ - 1))
    M.V = M.V(varargin(1:$ - 1))
  end
endfunction
%to_6=%to_e
 %to_6  = 
[M]=%to_6(varargin)
function M=%to_i_to(varargin)
  M=varargin($);N=varargin($-1)
  select varargin(1)
    case 'row2'
    M.N(2,:)=N.N
    M.V(2,:)=N.V
    case 'row1'
    M.N(1,:)=N.N
    M.V(1,:)=N.V
  else
    M.N(varargin(1:$-2))=N.N
    M.V(varargin(1:$-2))=N.V
  end
endfunction
M = mlist(['to','V','N'],[1 2 3;4 5 6],['a','b','c';'d','e','f']);
M.row1(2) = M.row2(1);
l = list(1,M,2);
l(2).row1(2) = M.row1(1);
if ~and(l(2).row1(2) == M.row1(1)) then bugmes();quit;end
if ~and(M.row1(2) == M.row2(1)) then bugmes();quit;end