SP: Fix 'shape' warning in conv 22/14522/2
Paul Bignier [Tue, 13 May 2014 09:38:10 +0000 (11:38 +0200)]
'shape' is a Scilab primitive, so don't use it as an argument.

This generated warnings for example when launching the help page example.

Change-Id: I5e0006f99916daca18664521f2c8fb3f04ffa167

scilab/modules/signal_processing/macros/conv.sci

index 0858eb1..50de648 100644 (file)
@@ -6,7 +6,7 @@
 // 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 h=conv(u,v,shape)
+function h=conv(u,v,Shape)
     if and(size(u)>1) then
         error( msprintf(_("%s: Wrong size for argument #%d: Vector expected.\n"),"conv",1))
     end
@@ -14,14 +14,14 @@ function h=conv(u,v,shape)
         error( msprintf(_("%s: Wrong size for argument #%d: Vector expected.\n"),"conv",2))
     end
     if argn(2)==2 then
-        shape="full",
-    elseif and(shape<>["full","same","valid"]) then
+        Shape="full",
+    elseif and(Shape<>["full","same","valid"]) then
         error(msprintf(_("%s: Wrong value for input argument #%d: ""%s"" or ""%s"" expected.\n"),"conv",3, """full"", ""same""","""valid"""));
     end
 
-    h=conv2(u(:),v(:),shape);
+    h=conv2(u(:),v(:),Shape);
     //set result orientation
-    if shape=="full" then
+    if Shape=="full" then
         if size(u,"*")>size(v,"*") then
             if size(u,1)==1 then h=matrix(h,1,-1);end
         else