C Math Library Reference | ![]() ![]() |
Register a print handler with the MATLAB C Math Library
C Prototype
void mlfSetPrintHandler(void(* PH)(const char *));
Arguments
void(* PH)(const char *)
Pointer to a function that takes a single argument, a const char *
(the message to be displayed), and returns void
. This function displays the character string.
Description
Instead of calling printf
directly, the MATLAB C Math Library calls a print handler when it needs to display an error message or warning. The default print handler used by the library takes a single argument, a const char *
(the message to be displayed), and returns void
.
To register your function and change which print handler the library uses, you must call the routine mlfSetPrintHandler
. If you use an alternate print handler, you must call mlfSetPrintHandler
before calling other library routines.
See Also
mlfSetErrorHandler
![]() | mlfSetLibraryAllocFcns | mlfVarargout | ![]() |