MATLAB REAL-TIME WORKSHOP 7 - TARGET LANGUAGE COMPILER Manual de servicio Pagina 29

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 282
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 28
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
Vista de pagina 28
1 2 ... 24 25 26 27 28 29 30 31 32 33 34 ... 281 282

Comentarios a estos manuales

Sin comentarios