Merge pull request #903 from JohannesPfeifer/filename_check

Add check for valid filename
time-shift
Houtan Bastani 2015-04-22 11:02:24 +02:00
commit dd55dca6af
1 changed files with 4 additions and 0 deletions

View File

@ -94,6 +94,10 @@ if ~ischar(fname)
error('DYNARE: argument of dynare must be a text string')
end
if ~isvarname(fname)
error('DYNARE: argument of dynare must conform to Matlab''s convention for naming functions, i.e. start with a letter and not contain special characters. Please rename your MOD-file.')
end
% Testing if file have extension
% If no extension default .mod is added
if isempty(strfind(fname,'.'))