Skip to content
check_inputs.m 724 B
Newer Older


%% check_inputs
%    ensure that the inputs are proper variable names, and that the
%    input string parses properly
% inputs:
%   object:GUI - current GUI object
% outputs:
%   error:string - error string if variable is not inputed properly
% Author: Colin Eles elesc@mcmaster.ca
% Organization: McMaster Centre for Software Certification
function error = check_inputs(object)
parsed_input = EMLGenerator.parse_inputs(get(object.function_inputs_control,'string'));
error = [];
for i=1:size(parsed_input,2)
    if(size(parsed_input{i},2) == 2)
        if (strcmp(parsed_input{i}(2),'error'))
            error = [error sprintf('%s is not a valid variable name\n',char(parsed_input{i}(1))) ];