This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Get the zero representation of a data type


void *ssGetDataTypeZero(SimStruct *S, DTypeId id)



SimStruct representing an S-Function block.


ID of a data type.


A pointer (void *) to the zero representation of the data type specified by id, if id is valid and the data type's size has been set. Otherwise, returns NULL and reports an error.


Use to obtain the zero representation of a data type, which is the value that represents zero for the custom data type.

    Note:   Because this macro reports any error that occurs, you do not need to use ssSetErrorStatus to report the error.

For more information about using custom data types in S-functions, see Custom Data Types.


C, C++


The following example gets the zero representation of a custom data type.

const void *myZero = ssGetDataTypeZero(S, id);
if(myZero == NULL) return;

Introduced before R2006a

Was this topic helpful?