Determine if data type is string
bool ssIsStringDataType(SimStruct *S, int dataType)
S
SimStruct representing an S-Function block.
dataType
ID of data type.
The Boolean value true
if the data type is a string. Otherwise,
returns false
.
ssIsStringDataType
determines if a data type is a
string.
C, C++
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; } ...
ssGetInputStringLength
, ssGetStringDataTypeMaxLength
, ssReadInputString
, ssRegisterStringDataType
ssWriteOutputString