Fix test win64b: test_run('integer', intops')
[scilab.git] / scilab / modules / integer / macros / %i_p_i.sci
1 // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
2 // Copyright (C) INRIA - 
3 // 
4 // This file must be used under the terms of the CeCILL.
5 // This source file is licensed as described in the file COPYING, which
6 // you should have received as part of this distribution.  The terms
7 // are also available at    
8 // http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
9
10
11 function r=%i_p_i(a,n)
12     if or(n<0) then
13         r=double(a)^n
14     else
15         if size(a,'*')==1 then
16             r=iconvert(double(a)^double(n),inttype(a))
17         else
18             if size(n,'*')<>1 then
19                 error(43)
20             else
21                 n=double(n)
22                 r=a
23                 if size(a,1)==size(a,2) then
24                     for i=2:n,r=r*a,end
25                 else
26                     mprintf(gettext("Warning: Syntax \""vector ^ scalar\"" is obsolete. It will be removed in Scilab 6.0.\n  Use \""vector .^ scalar\"" instead.\n"));
27                     for i=2:n,r=r.*a,end
28                 end
29             end
30         end
31     end  
32 endfunction