Background
I'm used to strongly typed, compiled languages, so I'm used to the fact that spelling errors are pretty much instantly perceived as undeclared variables.
However, since Matlab is a weakly typed language, this does not happen automatically, and my development cycle tends to be:
write function(s)
|
˅
Run <-------------------------
| |
˅ |
Crash due to misspelling/typo |
| |
˅ |
Correct typo -----------------|
The startup process may work for several minutes before moving on to a typo, which will significantly slow down my development cycle.
I am using matlab version 2007b
Question
, .., ? , , , .
, , depfun, - .
, , , .
function [biggest]=getBiggest(variableName1, variableName2)
if variablename1>variableName2, %<---misspelling!
biggest=variableName1;
else
biggest=variableName2;
end
end