summaryrefslogtreecommitdiffstats
path: root/scilab/modules/parameters
diff options
context:
space:
mode:
authorPierre MARECHAL <pierre.marechal@scilab.org>2010-04-15 11:08:25 +0200
committerPierre MARECHAL <pierre.marechal@scilab.org>2010-04-15 11:08:25 +0200
commiteae12932322c75441b23139e67227298b04cc3cd (patch)
tree3580aae93d18b896c5d81642e95040ff98649d6a /scilab/modules/parameters
parent5ed24f65118ace485d8e75827ffb8435b60a1106 (diff)
downloadscilab-eae12932322c75441b23139e67227298b04cc3cd.zip
scilab-eae12932322c75441b23139e67227298b04cc3cd.tar.gz
update the licence + update the error messages
Change-Id: I733140e06972a5c6832a1a4ce96d8ed9af82ee3f
Diffstat (limited to 'scilab/modules/parameters')
-rw-r--r--scilab/modules/parameters/macros/add_param.sci2
-rw-r--r--scilab/modules/parameters/macros/get_param.sci2
-rw-r--r--scilab/modules/parameters/macros/is_param.sci2
-rw-r--r--scilab/modules/parameters/macros/list_param.sci3
-rw-r--r--scilab/modules/parameters/macros/remove_param.sci3
-rw-r--r--scilab/modules/parameters/macros/set_param.sci2
6 files changed, 8 insertions, 6 deletions
diff --git a/scilab/modules/parameters/macros/add_param.sci b/scilab/modules/parameters/macros/add_param.sci
index 5262b90..cb80f37 100644
--- a/scilab/modules/parameters/macros/add_param.sci
+++ b/scilab/modules/parameters/macros/add_param.sci
@@ -17,7 +17,7 @@ else
17 if nargout==2 then 17 if nargout==2 then
18 err = %T; 18 err = %T;
19 end 19 end
20 warning(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), 1, "plist", "add_param")); 20 error(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), "add_param", 1, "plist"));
21end 21end
22plist = list_name; 22plist = list_name;
23endfunction 23endfunction
diff --git a/scilab/modules/parameters/macros/get_param.sci b/scilab/modules/parameters/macros/get_param.sci
index 01fc64c..ce5ea05 100644
--- a/scilab/modules/parameters/macros/get_param.sci
+++ b/scilab/modules/parameters/macros/get_param.sci
@@ -32,7 +32,7 @@ else
32 if nargout==2 then 32 if nargout==2 then
33 err = %T; 33 err = %T;
34 else 34 else
35 warning(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), 1, "plist", "get_param")); 35 error(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), "get_param", 1, "plist"));
36 end 36 end
37end 37end
38endfunction 38endfunction
diff --git a/scilab/modules/parameters/macros/is_param.sci b/scilab/modules/parameters/macros/is_param.sci
index 808ea2d..8f15910 100644
--- a/scilab/modules/parameters/macros/is_param.sci
+++ b/scilab/modules/parameters/macros/is_param.sci
@@ -17,7 +17,7 @@ else
17 if nargout==2 then 17 if nargout==2 then
18 err = %T; 18 err = %T;
19 else 19 else
20 warning(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), 1, "plist", "is_param")); 20 error(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), "is_param", 1, "plist"));
21 end 21 end
22end 22end
23endfunction 23endfunction
diff --git a/scilab/modules/parameters/macros/list_param.sci b/scilab/modules/parameters/macros/list_param.sci
index 44fd938eb..5b75e38 100644
--- a/scilab/modules/parameters/macros/list_param.sci
+++ b/scilab/modules/parameters/macros/list_param.sci
@@ -9,6 +9,7 @@
9 9
10function [string_list,err] = list_param(list_name) 10function [string_list,err] = list_param(list_name)
11[nargout,nargin] = argn(); 11[nargout,nargin] = argn();
12string_list = [];
12if typeof(list_name)=='plist' then 13if typeof(list_name)=='plist' then
13 string_list = getfield(1,list_name); 14 string_list = getfield(1,list_name);
14 string_list = string_list(2:$); 15 string_list = string_list(2:$);
@@ -17,7 +18,7 @@ else
17 if nargout==2 then 18 if nargout==2 then
18 err = %T; 19 err = %T;
19 else 20 else
20 warning(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), 1, "plist", "list_param")); 21 error(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), "list_param", 1, "plist"));
21 end 22 end
22end 23end
23endfunction 24endfunction
diff --git a/scilab/modules/parameters/macros/remove_param.sci b/scilab/modules/parameters/macros/remove_param.sci
index 04fdb4a..fc7f6a3 100644
--- a/scilab/modules/parameters/macros/remove_param.sci
+++ b/scilab/modules/parameters/macros/remove_param.sci
@@ -9,6 +9,7 @@
9 9
10function [plist,err] = remove_param(list_name,param_name) 10function [plist,err] = remove_param(list_name,param_name)
11[nargout,nargin] = argn(); 11[nargout,nargin] = argn();
12plist = [];
12if typeof(list_name)=='plist' then 13if typeof(list_name)=='plist' then
13 if is_param(list_name,param_name) then 14 if is_param(list_name,param_name) then
14 Index = grep(getfield(1,list_name),param_name); 15 Index = grep(getfield(1,list_name),param_name);
@@ -36,7 +37,7 @@ else
36 if nargout==2 then 37 if nargout==2 then
37 err = %T; 38 err = %T;
38 else 39 else
39 warning(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), 1, "plist", "remove_param")); 40 error(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), "remove_param", 1, "plist"));
40 end 41 end
41end 42end
42endfunction 43endfunction
diff --git a/scilab/modules/parameters/macros/set_param.sci b/scilab/modules/parameters/macros/set_param.sci
index 3786e95..9a453ab 100644
--- a/scilab/modules/parameters/macros/set_param.sci
+++ b/scilab/modules/parameters/macros/set_param.sci
@@ -22,7 +22,7 @@ else
22 if nargout==2 then 22 if nargout==2 then
23 err = %T; 23 err = %T;
24 else 24 else
25 warning(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), 1, "plist", "set_param")); 25 error(sprintf(gettext("%s: Wrong type for input argument #%d: %s expected.\n"), "set_param", 1, "plist"));
26 end 26 end
27end 27end
28endfunction 28endfunction