pos_num=sscanf(token(4),'%d');%this is the fixed position number in the argument list
pos_num=sscanf(token(4),'%d');%this is the fixed position number in the argument list
token_new=token(6:end);%get rid off prefix
ifpos_num<=numel(Arguments)% rsc - check if enough arguments are given
value=Arguments{pos_num};%get value/object
...
...
@@ -237,6 +238,8 @@ Arguments = newArguments;
nArguments=length(Arguments);
fieldNamesInStruct=fieldnames(inStruct);
idx=1;
notFoundArguments=0;
while(idx<=nArguments)% go through all arguments
% if ~ischar(Arguments{idx}), error([thisFuncStr 'The arguments specified to call "' callFuncStr '" are not correct. Check the arguments, the corresponding values and the order.']); end;
if~ischar(Arguments{idx})
...
...
@@ -285,13 +288,26 @@ while (idx <= nArguments) % go through all arguments
end
end
else
error([thisFuncStrcallFuncStr'There is no entry in the struct for this argument: 'lower(Arguments{idx})]);
notFoundArguments=1;
% this handles the case that some arguments are not found
notFoundCell{end+1}=Arguments{idx};
idx=idx+1;
ifidx<=nArguments
notFoundCell{end+1}=Arguments{idx};
idx=idx+1;
end
end
end
ifnotFoundArguments==1
ita_verbose_info([thisFuncStrcallFuncStr'Some arguments could not be found in the struct. They are returned separately.'],0);
end
%% search for pseudo boolean - also done when no arguments specified