OPT_REAL

Previous  Next

 

OPT_REAL( real-value, default )

 


 

Retrieve an optional REAL.  Return the default value if the parameter wasn't present.

 

Example

 

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

//

// nStatus  = Graph.SCALE( control AS INTEGER,

//                         axis AS INTEGER,         0 = X-axis, 1 = Y-axis

//                         lower AS REAL = 0,       lower == upper --> AutoScale

//                         upper AS REAL = 0 ) AS INTEGER

//

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

//

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

  {

  AFX_MANAGE_STATE( AfxGetStaticModuleState() );

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

 

  BEGIN_PARSE( s, l )

     POP_INT( nControl )

     OPT_INT( nAxis, 0 )

     OPT_REAL( fMin, 0 )

     OPT_REAL( fMax, 0 )

  END_PARSE

 

  int nRet = g_this->ScaleAxis( nControl, nAxis, fMin, fMax );

 

  RETURN_INT( nRet );

  }

endfunc