summaryrefslogtreecommitdiff
path: root/modules/overloading/macros/generic_i_st.sci
blob: 42e9b2bbd2e929faa164225c0d57511d568b45f6 (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
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) INRIA -  F. Delebecque
// Copyright (C) INRIA -  S. Steer
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution.  The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt

function out=generic_i_st(i,in,out)

    // out.i=in
    // this function is called only if the i field is not already defined in out
    //
    if prod(out.dims)>1 then
        error(1);
    end
    T=getfield(1,out);
    T($+1)=i;setfield(1,T,out)
    setfield($+1,in,out)
    if double(out.dims)==[0 0] then
        out.dims=int32([1 1]);
    end
endfunction