tomwalters@0: % method of class @parameter tomwalters@0: % bleeck@3: % (c) 2011, University of Southampton bleeck@3: % Maintained by Stefan Bleeck (bleeck@gmail.com) bleeck@3: % download of current version is on the soundsoftware site: bleeck@3: % http://code.soundsoftware.ac.uk/projects/aimmat bleeck@3: % documentation and everything is on http://www.acousticscale.org bleeck@3: bleeck@3: tomwalters@0: function val=exist(param,text,inbox) tomwalters@0: % returns a boolean value that indicates if that string has a valid field tomwalters@0: tomwalters@0: cont=param.entries; tomwalters@0: nrent=length(cont); tomwalters@0: tomwalters@0: if nargin<3 % search in all subsections tomwalters@0: inbox='all'; tomwalters@0: end tomwalters@0: tomwalters@0: tomwalters@0: nr=getentrynumberbytext(param,text,inbox); tomwalters@0: tomwalters@0: if nr>0 tomwalters@0: val=1; tomwalters@0: else tomwalters@0: val=0; % we must return a logical value otherwise it can generate difficult errors tomwalters@0: end