Main Content

block comment, %{ %}

Block comments

Syntax

Description

%{ and %} enclose a block of comments that extend beyond one line.

example

Examples

expand all

Add a block comment to a program using the %{ and %} symbols. With the exception of white-space characters, the %{ and %} symbols must appear alone on the lines that immediately precede and follow the block of comment text.

%{
Block comments are useful for giving longer explanations of code logic and
reasoning, instead of using a % symbol at the beginning of each line.
%}

Version History

Introduced before R2006a

See Also