ssIsStringDataType

Determine if data type is string

Syntax

bool ssIsStringDataType(SimStruct *S, int dataType)

Arguments

S

SimStruct representing an S-Function block.

dataType

ID 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.

Languages

C, C++

Example

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;
       }
...
Introduced in R2020b