mb_has_arg

Previous  Next

 

bool_t mb_has_arg( mb_interpreter_t* s, void** l )

 


 

Detect if there is any more arguments.

 

Example

 

/////////////////////////////////////////////////////////////////////////////

//

int _core_beep( mb_interpreter_t* s, void** l )

  {

  /* BEEP statement */

 

  int   result = MB_FUNC_OK;

  int   nBeep = -1;

 

  mb_assert( s && l );

 

  mb_check( mb_attempt_func_begin( s, l ) );

 

  if ( mb_has_arg( s, l ) ) mb_check( mb_pop_int( s, l, &nBeep ) );

 

  mb_check( mb_attempt_func_end( s, l ) );

 

  mb_check( mb_push_int( s, l, os_MessageBeep( nBeep ) ) );

 

  return result;

  }

endfunc