Comment with percent (%
) following comma acts as a row
separator. Your use of a comma suggests that you are trying to create a row
vector, rather than a column vector. Within array initializations, this can
cause unintended errors by spitting an into separate rows in unintended
locations.
To comment within an array without splitting rows, replace the percent
(%
) with an ellipsis(…
).
Old | New |
---|---|
The comment acts as a row separator causing the array to have uneven dimensions. This generates an error.
| The comment does not act as a row separator.
|
If the row separation is intentional, replace the comma with a semicolon to make the row separation clearer.