mb_pop_int

Previous  Next

 

status_t mb_pop_int( mb_interpreter_t* s, void** l, int_t* val )

 


 

This function pops an INTEGER parameter from the interpreter.

 

Example

 

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

//

LOCAL int _std_rgb( mb_interpreter_t* s, void** l )

  {

  int      r, g, b;

 

  mb_assert( s && l );

 

  mb_check( mb_attempt_open_bracket( s, l ) );

  mb_check( mb_pop_int( s, l, &r ) );

  mb_check( mb_pop_int( s, l, &g ) );

  mb_check( mb_pop_int( s, l, &b ) );

  mb_check( mb_attempt_close_bracket( s, l ) );

 

  mb_check( mb_push_int( s, l, RGB( r, g, b ) ) );

 

  return MB_FUNC_OK;

  }

endfunc