How is it possible to get the following error message

Error, invalid input: DMat:-DSolveSys expects default value for keyword parameter begynd to be of type Vector, but received {}

?

I thought that the default value of a keyword parameter need not match any particular type, in fact so it says in the help page for 'Procedure Parameter Declarations' :

" { ... keyword :: parameterType := defaultValue ... }
The ":parameterType'" declaration may be omitted, in which case no type checking is done when a keyword argument is passed. If a type is specified, then the value part of the keyword argument must be of that type, or an exception is raised.
Once again, the defaultValue need not match the parameterType, and if it does not, it must not evaluate to anything other than itself."

Unfortunately, I have not yet been able to reproduce this behavior outside the rather complicated setting in which it occurs.
Another disturbing fact is that debug(  DMat:-DSolveSys);  and (!) undebug( DMat:-DSolveSys); makes the error disappear.

It is easy enough to work around the problem, but it just puzzles me, why it is necessary.

Preben Alsholm

 

 


Please Wait...