| Writing S-Functions | ![]() |
Print a variable-content message.
Syntax
ssPrintf(msg, ...)
Arguments
msg
Message. Must be a string with optional variable replacement parameters.
...Description
Prints variable-content msg. This macro expands to mexPrintf when the S-function is compiled via mex for use with Simulink. When the S-function is compiled for use with the Real-Time Workshop, 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 Real-Time Workshop, you can avoid a call altogether, using the SS_STDIO_AVAILABLE macro, e.g.,
#if defined(SS_STDIO_AVAILABLE)
ssPrintf("my message ...");
#endif
Languages
See Also
| ssIsVariableStepSolver | ssRegAllTunableParamsAsRunTimeParams | ![]() |