MATLAB Compiler | ![]() ![]() |
A print handler is a routine that controls how your application displays the output generated by calls to mlf
routines.
The system provides a default print handler for your application. The default print handler writes output to the standard output stream. If this print handler is suitable for your application, you do not need to write and register another print handler.
However, you can override the default behavior by writing and registering an alternative print handler. In fact, if you are coding a stand-alone application with a GUI, then you must register another print handler to display application output inside a GUI mechanism, such as a Windows message box or a Motif Label widget.
You write an alternative print handler routine in C or C++ and register its name at the beginning of your stand-alone application.
The way you register a print handler depends on whether or not "the main
routine" (or first routine called) for your application is written in C or in M.
![]() | Using Pragmas | Main Routine Written in C | ![]() |