ssIsStringDataType
Determine if data type is string
Syntax
bool ssIsStringDataType(SimStruct *S, int dataType)
Arguments
SSimStruct that represents an S-Function block.
dataTypeID of data type.
Returns
The Boolean value true if the data type is a string. Otherwise,
returns false.
Description
ssIsStringDataType determines if a data type is a
string.
Limitations
Non-inlined S-functions that contain string SimStruct functions do not run with rapid accelerator mode.
Languages
C, C++
Examples
This example determines a string data type.
DTypeId dataType;
if (ssIsStringDataType(S, dataType))
ssSetInputPortDataType(S, 0, dataType);
else
{
ssSetErrorStatus(S, "Input 1 must be a string");
return;
}
...See Also
ssGetInputStringLength, ssGetStringDataTypeMaxLength, ssReadInputString , ssRegisterStringDataTypessWriteOutputString
Version History
Introduced in R2020b