Technical data

Compiler Directives
2-9
Use the /%...%/ construct to delimit comments within your code. Use the %%
construct for line-based comments; all characters from
%% to the end of the line
become a comment.
Nondirective lines, that is, lines that do not have
% as their first nonblank
character, are copied into the output buffer verbatim. For example,
/* Initialize sysNumber */
int sysNumber = 3;
copies both lines to the output buffer.
To include comments on lines that do not begin with the
% character, you can
use the
/%...%/ or %% comment directives. In these cases, the comments are not
copied to the output buffer.
Note: If a nondirective line appears within a function, it is not copied to the
output buffer unless the function is an output function or you specifically
select an output file using the
%selectfile directive. For more information
about functions, see the “Target Language Functions” section in this chapter.
Line Continuation
You can use the C language \ character or the MATLAB sequence ... to
continue a line. If a directive is too long to fit conveniently on one line, this
allows you to split up the directive on to multiple lines. For example
%roll sigIdx = RollRegions, lcv = RollThreshold, block,\
"Roller", rollVars
or
%roll sigIdx = RollRegions, lcv = RollThreshold, block,...
"Roller", rollVars