Skip to content
Snippets Groups Projects
Commit d0043e4e authored by Stéphane Adjemian's avatar Stéphane Adjemian
Browse files

Fixed case sensitivity issue with respect to TO and DO keywords.

parent 4bb7ac14
No related branches found
No related tags found
No related merge requests found
...@@ -17,12 +17,14 @@ function from(varargin) ...@@ -17,12 +17,14 @@ function from(varargin)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
if ~(ismember('to',varargin) && ismember('do',varargin)) lvarargin = lower(varargin);
if ~(ismember('to',lvarargin) && ismember('do',lvarargin))
error('This command must be followed by TO and DO keywords (in that order).') error('This command must be followed by TO and DO keywords (in that order).')
end end
to_id = strmatch('to',varargin); to_id = strmatch('to',lvarargin);
do_id = strmatch('do',varargin); do_id = strmatch('do',lvarargin);
if do_id<to_id if do_id<to_id
error(sprintf('Wrong syntax! The TO keyword must preceed the DO keyword.\nThe correct syntax is:\n\n from d1 to d2 do SOMETHING\n\n where d1<d2 are dates objects, and SOMETHING is a recursive expression involving dseries objects.')) error(sprintf('Wrong syntax! The TO keyword must preceed the DO keyword.\nThe correct syntax is:\n\n from d1 to d2 do SOMETHING\n\n where d1<d2 are dates objects, and SOMETHING is a recursive expression involving dseries objects.'))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment