comments
Add comments to Nelson code.
📝Syntax
% comment
code % inline comment
%{
block comment
%}
📄Description

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.

💡Examples
Single-line and inline comments
% Add two numbers
a = 1;
b = 2;
c = a + b; % store result
Block comments
a = magic(3);
%{
sum(a)
diag(a)
sum(diag(a))
%}
disp(a)
🔗See Also
headcomments
🕔Version History
Version Description
1.17.0 Initial version.
Edit this page on GitHub