head_comments function updated due to operations with empty matrix. 19/18119/3
Adeline CARNIS [Mon, 25 Apr 2016 15:36:15 +0000 (17:36 +0200)]
Change-Id: I78b57f70d6a945e0dd86e606d94f6a296b9f15b1

scilab/modules/functions/macros/head_comments.sci

index 028b02d..3bd121f 100644 (file)
@@ -37,6 +37,12 @@ function head_comments(name, %paths)
     for k=1:size(t.inputs)
         inputs=[inputs,expression2code(t.inputs(k))]
     end
+    if isempty(outputs) then
+        outputs = '';
+    end
+    if isempty(inputs) then
+        inputs = '';
+    end
     syntax = "function ["+strcat(outputs,",")+"] = "+name+"("+strcat(inputs,",")+")";
 
     comm = [];