POP_INT

Previous  Next

 

POP_INT( int-value )

 


 

Retrieves an INTEGER parameter.  If not present, an error will be signalled.

 

Example

 

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

//

// nElement = Graph.ADDELEMENT( control AS INTEGER,

//                              name    AS STRING,

//                              x-data  AS ARRAY,

//                              y-data  AS ARRAY ) AS INTEGER

//

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

//

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

  {

  AFX_MANAGE_STATE( AfxGetStaticModuleState() );

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

 

  BEGIN_PARSE( s, l )

     POP_INT( nControl )

     POP_STRING( pName )

     POP_ARRAY( pX )

     OPT_ARRAY( pY, NULL )

  END_PARSE

 

  mb_error_e nErr = SE_NO_ERR;

 

  int nElement = g_this->AddElement( nControl, pName, pX, pY, &nErr );

 

  if ( nElement == 0 )

     {

     RETURN_ERROR( nErr );

     }

  endif

 

  RETURN_INT( nElement );

  }

endfunc