mb_attempt_func_end

Previous  Next

 

status_t mb_attempt_func_end( mb_interpreter_t* s, void** l )

 


 

Ends parsing of a registered statement or function without parameters.

 

Example

 

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

//

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

  {

  /* Get a random value among 0 ~ 1 */

 

  int      result = MB_FUNC_OK;

  real_t   rnd = (real_t)0.0f;

 

  mb_assert( s && l );

 

  mb_check( mb_attempt_func_begin( s, l ) );

  mb_check( mb_attempt_func_end( s, l ) );

 

  rnd = (real_t)( ( (real_t)(rand() % 101) ) / 100.0f );

  mb_check( mb_push_real( s, l, rnd ) );

 

  return result;

  }

endfunc