Reads an optional argument from an OPER, optionally using a default for omitted arguments
[C++]
int ReadOpt(
bool& result,
bool defaultValue
);
int ReadOpt(
double& result,
double defaultValue
);
int ReadOpt(
CString& result,
const char* defaultValue
);
int ReadOpt(
USHORT& result,
USHORT defaultValue
);
int ReadOpt(
short& result,
short defaultValue
);
int ReadOpt(
long& result,
long defaultValue
);
If an appropriate value is found, then it is converted to the output type and placed in the variable referenced by this parameter.
If the value is missing or empty, then the default value will be used.
If the argument cannot be converted, then the output variable will not be affected.
If the value is missing or empty, then the default value will be copied to the output value. Otherwise the default is not used.
This function returns -1, 0 or 1 as follows:-1 The argument was of an unexpected type and could not be read. 0 The argument was missing or empty, and the default value was used. 1 The argument was present and correct.
Header: xllplus.h