• # Ne detect pas matlab

    Posté par . En réponse au journal UU.zoy.org, le site qui vous a à la colle.. Évalué à 2.

    Sympathique projet, mais a echoue a detecte du code Matlab (identifie comme Perl)
    http://uu.zoy.org/v/bemi.perl

    functionpropertyList =read_property_file(fileName)
    % READ_PROPERTY_FILE - read a project properties file
    % Read a property file and return a structure containing the property list with their values.
    % Parameters :
    % FILENAME : the file which contains the properties. - String - Required
    % Output Parameters :
    % PROPERTYLIST : a structure which contain the properties and their values.
     if(~exist(fileName,'file'))
     propertyList=[];
     return;
     end
     fid = fopen(fileName, 'rt');
     propertyList = [];
     while feof(fid) == 0
     tline = fgetl(fid);
     %Do the job only for the line does'nt contain comments which start
     %with the caracter #
     if( ~isempty(tline) && ~strcmp(tline(1),'#'))
     %tmp = split_string(tline,'=');
     tmp = regexp(tline,'=','split');
     if(length(tmp)==2)
     propertyList.(tmp{1})=tmp{2};
     end
     end
     end
     fclose(fid);
    end