mb_data_e_to_string

Previous  Next

 

char* mb_data_e_to_string( mb_data_e eType, LPSTR lpszString )

 


 

Returns the string representation of the mb_data_e data type.  The type string is written to the supplied lpszString buffer.  The function will return the address of the output buffer so it can be used in function calls.

 

Example

 

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

// Return the type of variable as a string

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

{

  // Parse Parameter

  BEGIN_PARSE( s, l )

     POP_VALUE( val )

  END_PARSE

 

  // Need a buffer to hold output from mb_make_value_t

  char buffer[256];

 

  // Copy to output string that we can return

  COPY_STRING( pOutput, mb_value_e_to_string( val.type, buffer ) );

 

  // Return the type as string

  RETURN_STRING( pOutput );

}