% comment
code % inline comment
%{
block comment
%}
Comments are used to describe code and improve readability. They are ignored during execution.
Nelson supports single-line comments using the % character and block comments using the %{ and %} delimiters.
Block comment delimiters must appear alone on their respective lines. Any text between them is treated as a comment.
Multi-line comments are supported by the interpreter, editor, debugger, and headcomments.
% Add two numbers
a = 1;
b = 2;
c = a + b; % store result
a = magic(3);
%{
sum(a)
diag(a)
sum(diag(a))
%}
disp(a)
| Version | Description |
|---|---|
| 1.17.0 | Initial version. |