summaryrefslogtreecommitdiff
path: root/macros/setOptions.sci
diff options
context:
space:
mode:
authorHarpreet2015-08-31 18:36:09 +0530
committerHarpreet2015-08-31 18:36:09 +0530
commitb9490a903ae42debe53a96b224d508974c86db6e (patch)
treec8fe139842f0fe0c8c70fea575de24b966ea1e61 /macros/setOptions.sci
parent8b1a4b1ba36dfdf584d9b5a139de4220573a5a1b (diff)
downloadsymphony-b9490a903ae42debe53a96b224d508974c86db6e.tar.gz
symphony-b9490a903ae42debe53a96b224d508974c86db6e.tar.bz2
symphony-b9490a903ae42debe53a96b224d508974c86db6e.zip
Set Options Checked
Diffstat (limited to 'macros/setOptions.sci')
-rw-r--r--macros/setOptions.sci20
1 files changed, 10 insertions, 10 deletions
diff --git a/macros/setOptions.sci b/macros/setOptions.sci
index 8bf44a0..9d1be61 100644
--- a/macros/setOptions.sci
+++ b/macros/setOptions.sci
@@ -13,27 +13,27 @@ function setOptions(varagin)
options = varagin(1);
nbOpt = size(options,2);
- //Check the number of options which should be even
- if(pmodulo(nbOpt,2)) then
- errmsg = msprintf(gettext("%s: Odd number of arguments, the number should be even"), "setOptions");
- error(errmsg)
- end
+
+
+
+ value = strtod(options)
+
if (nbOpt~=0) then
for i = 1:(nbOpt/2)
//Setting the parameters
//Check if the given parameter is String
- if (type(options(2*i))==10) then
- sym_setStrParam(options(2*i - 1),options(2*i));
+ if (value(2*i) == %nan ) then
+ sym_setStrParam(options(2*i - 1),value(2*i));
//Check if the given parameter is Double
- elseif(type(options(2*i))==1) then
- sym_setDblParam(options(2*i - 1),options(2*i));
+ elseif(type(value(2*i))==1) then
+ sym_setDblParam(options(2*i - 1),value(2*i));
//Check if the given parameter is Integer
- elseif(type(options(2*i))==8)
+ elseif(type(value(2*i))==8)
sym_setIntParam(options(2*i - 1),options(2*i));
end