VERIFY_NUM_VALUE

Previous  Next

 

VERIFY_NUM_VALUE( value )

 


 

Verifies that the supplied value is a numeric value.  This can be either a REAL or INTEGER.  You can then use the REAL_VALUE or INT_VALUE to get the value casted to the desired format.  If not, the macro will signal a SE_RN_BAD_PARAMS error.

 

Example

 

BEGIN_PARSE( s, l )

  POP_VALUE( val )

END_PARSE

 

// Verify that it is a REAL or INTEGER value

VERIFY_NUM_VALUE( val );

 

// Get the value as a float

float fRealValue = REAL_VALUE( val );