APIAny_​UsableGDLStringID

Determines whether the string is a GDL keyword or reserved symbol

    GSErrCode ACAPI_Goodies (
        APIAny_UsableGDLStringID,
        const char*     str
    );

 

Parameters

str
[in] a string to check as a GDL keyword or reserved symbol

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
str is nullptr
APIERR_GENERAL
the string is a valid GDL keyword or reserved symbol

For other common API errors see the API Errors document.

 

Remarks

This function is used to check whether the given string is a reserved GDL keyword or symbol; or fulfills or not certain requirements to become one.

By general the function returns NoError if the passed string can be used in a GDL script as an own identifier. For example if your creates a LibraryPart with scripts installed, and some part of the script is generated on the fly, it is a good idea to check the components for usability.

 

Example


GSErrCode   err;

err = ACAPI_Goodies (APIAny_UsableGDLStringID, "material", nullptr);
/* returns APIERR_GENERAL, it is reserved keyword; */
/* cannot be used as a script variable  */

err = ACAPI_Goodies (APIAny_UsableGDLStringID, "list", nullptr);
/* OK; returns NoError */
/* it can be used as a script variable */

 

 

Requirements

Version: API 4.1 or later
Header: APIdefs_Goodies.h

 

See Also

ACAPI_Goodies,
API Functions