VERIFY_STRING_VALUE |
![]() ![]() |
VERIFY_STRING_VALUE( string-value )
This is useful when accepting NULL as the value to an empty or non-existing string parameter. It will verify that the supplied parameter was a string or NULL. If not, the macro will signal a SE_RN_BAD_PARAMS error.
Example
///////////////////////////////////////////////////////////////////////////// // int _scriptbar( mb_interpreter_t* s, void** l ) //( BOOL bState ); { BEGIN_PARSE( s, l ) OPT_VALUE( vFolder, MB_EMPTY_VALUE ) OPT_VALUE( vFileName, MB_EMPTY_VALUE ) OPT_INT( nWidth, -1 ) END_PARSE
VERIFY_STRING_VALUE( vFolder ); VERIFY_STRING_VALUE( vFileName );
RETURN_STATUS( g_this->LoadScriptBar( vFolder.value.string, vFileName.value.string, nWidth ) ); }
|