Skip to content
Snippets Groups Projects
Commit 39c7b793 authored by Johannes Pfeifer's avatar Johannes Pfeifer
Browse files

Add check for valid filename

Uses the same restrictions as variable names.
parent c6cf5ea6
No related merge requests found
......@@ -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,'.'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment