Reads a single value from an array into a number or string
[C++]
BOOL ReadVectorItem(
double& dResult,
const char* pszArgName,
long lItem,
const char* pszItemName,
CString& strError = 0,
long lFlags = XLA_ITEM_FLAGS_STD
) const;
BOOL ReadVectorItem(
double& dResult,
const char* pszArgName,
long lItem,
const char* pszItemName,
CXlOper& xloError,
long lFlags = XLA_ITEM_FLAGS_STD
) const;
BOOL ReadVectorItem(
CString& strResult,
const char* pszArgName,
long lItem,
const char* pszItemName,
CString& strError,
long lFlags = XLA_ITEM_FLAGS_STD
) const;
BOOL ReadVectorItem(
CString& strResult,
const char* pszArgName,
long lItem,
const char* pszItemName,
CXlOper& xloError,
long lFlags = XLA_ARRAY_FLAGS_STD
) const;
BOOL ReadVectorItem(
long& lResult,
const char* pszArgName,
long lItem,
const char* pszItemName,
CString& strError,
long lFlags = XLA_ITEM_FLAGS_STD
) const;
BOOL ReadVectorItem(
long& lResult,
const char* pszArgName,
long lItem,
const char* pszItemName,
CXlOper& xloError,
long lFlags = XLA_ITEM_FLAGS_STD
) const;
BOOL ReadVectorItem(
bool& bResult,
const char* pszArgName,
long lItem,
const char* pszItemName,
CString& strError,
long lFlags = XLA_ITEM_FLAGS_STD
) const;
BOOL ReadVectorItem(
bool& bResult,
const char* pszArgName,
long lItem,
const char* pszItemName,
CXlOper& xloError,
long lFlags = XLA_ITEM_FLAGS_STD
) const;
A buffer for the extracted value (if any).
The name of the argument that is being read. This will be used in any error strings that are generated.
The zero-based index of the item that is being extracted from the argument. If the argument is presented as a vector, then this value determines which item is extracted.
The name of the item that is being extracted from the argument. If the argument is presented as two-column array of labeled values, then this value will be used to search the left-hand column. It will also be used in any error strings that are generated.
Reference to an error string buffer. If the function fails for any reason, a useful error string will be placed here, e.g. "MyArgName: expected number in cell 3".
Flags controlling the conversion. See matrix & vector flags for a full list of flag values.
If any error occurs, a description will be put into xloError. It can then conveniently be returned as the result of the add-in function.
A CString, into which the result (if any) will be placed.
A long integer, whose contents will be replaced by the extracted value (if any).
A boolean value, whose contents will be replaced by the extracted value (if any).
The function returns TRUE if the conversion was successful,
FALSE if it failed for any reason. If it fails, an explanatory error string will be written
to strError or xloError.
This should be returned to the user.
This function is used (particularly in generated code) to extract
the various items from a compressed group argument. The user may present the grouped argument in one of two forms:
If the argument cannot be found, then an error string will be set and FALSE will be returned.
If the argument is found, then the function will attempt to convert it to the required type. If this conversion fails, then the function will return FALSE and set the error string.
See Compressed Groups in the User Guide for more information about the permitted layouts of the input argument.
This function is deprecated, and is supported for compatibility purposes.
The simpler function ReadGroupItem()
is preferred.
Header: xllplus.h
COper Class
| COper Methods
| COper::ReadGroupItem()
| Compressed Groups