User`s guide

Compile-Time Errors
B-3
Error: File: filename Line: # Column: # () indexing must appear last in an index expression.
If you use ordinary array indexing () to index into an expression, it must be
last in the index expression. For example, you can use
X(1).value and
X{2}(1), but you cannot use X.value(1) or X(1){2}.
Error: File: filename Line: # Column: # A CONTINUE may only be used within a FOR or WHILE
loop.
Use Continue to pass control to the next iteration of a for or while loop.
Error: File: filename Line: # Column: # A function declaration cannot appear within a script
M-file.
There is a function declaration in the file to be compiled, but it is not at
the beginning of the file. Scripts cannot have any function declarations;
function M-files must start with a function.
Error: File: filename Line: # Column: # Assignment statements cannot produce a result. An
assignment statement cannot be used in a place where an expression, but not
a statement, is expected. In particular, this message often identifies errors
where an assignment was used, but an equality test was intended. For
example:
if x == y, z = w; end % Correct
if x = y, z = w; end % Incorrect
Error: File: filename Line: # Column: # A variable cannot be made storageclass1 after being
used as a storageclass2.
You cannot change a variables storage class (global/
local/persistent). Even though MATLAB allows this type of change in scope, the
Compiler does not.
Error: File: filename Line: # Column: # An array for multiple LHS assignment must be a vector.
If the left-hand side of a statement is a multiple assignment, the list of
left-hand side variables must be a vector. For example:
[p1, p2, p3] = myfunc(a) % Correct
[p1; p2; p3] = myfunc(a) % Incorrect
Error: File: filename Line: # Column: # An array for multiple LHS assignment cannot be
empty.
If the left-hand side of a statement is a multiple assignment, the list of
left-hand side variables cannot be empty. For example:
[p1, p2, p3] = myfunc(a) % Correct
[ ] = myfunc(a) % Incorrect