Previous  Next


void* mb_get_printer( mb_interpreter_t* s, bool_t* pbEx )



Returns the current output handler that is used by PRINT.  If the pbEx parameter is supplied, then it will be set if the returned handler is the extended version.


The output handlers are defined as


typedef int (*mb_print_func_t)( const char*, ... );


Extended Version


typedef int (*mb_print_func2_t)( struct mb_interpreter_t*, const char*, ... );




bool_t bExt = FALSE;

void*         pHandler;

char   line[256];


mb_print_format( bas, "Hello World !!!\n", line );


pHandler = mb_get_printer( bas, &bExt );


if ( bExt )


  ((mb_print_func2_t)pHandler( bas, line );




  ((mb_print_func_t)pHandler( line );