OPT_STRING

Previous  Next

 

OPT_STRING( string-value, default )

 


 

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

 

Example

 

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

  {

  AFX_MANAGE_STATE( AfxGetStaticModuleState() );

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

 

  BEGIN_PARSE( s, l )

     POP_STRING( str )

     OPT_STRING( cap, "Debug" )

     OPT_INT( opt, MB_OK )

  END_PARSE

 

  RETURN_INT( ::MessageBox( NULL, str, cap, opt ) );

  }

endfunc