Whitespace after characters
ID | LAYOUT-4 |
Title | Commas, semicolons and keywords shall be followed by a space unless at the end of the statement. |
Priority | Recommended |
Severity level | 9 |
Description | Commas, semicolons and keywords (for , while , if etc.) shall be followed by a space unless at the end of the statement. |
Rationale | A clear separation of keywords from other code improves readability. |
Avoid:
while(ismember(x, [3,5,7,11,13]))
x = x + 2;
end
Instead use:
while ismember(x, [3, 5, 7, 11, 13])
x = x + 2;
end