| Contents | Index |
int_T ssPrintf(const char_T *msg, ...)
Message. Must be a ANSI®[1] C printf-style string with optional variable replacement parameters.
Optional replacement arguments.
A positive value indicating the number of bytes transmitted. Returns a negative number indicating an error.
Prints a variable-content msg. This macro expands to mexPrintf when the S-function is compiled via mex for use in a Simulink simulation. When the S-function is compiled for use with the Simulink Coder code generation, this macro expands to printf if the target has stdio facilities; otherwise, it becomes a call to an empty function (rtPrintfNoOp). In the case of code generation, you can avoid a call altogether, using the SS_STDIO_AVAILABLE macro defined by simstruc.h. For example:
#if defined(SS_STDIO_AVAILABLE)
ssPrintf("my message ...");
#endif
C, C++
See the S-function sfun_atol.c used in sfcndemo_sfun_atol.mdl.
[1] ANSI is a registered trademark of the American National Standards Institute, Inc.

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |