Community articleData types
Added by IBM contributorIBM on July 26, 2013
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

In your C programs, use the custom data types that are defined for cross platform compatibility.
These data types allow applications that use the API to be easily ported between various systems without requiring any source code to be rewritten or recompiled. The following table lists the pre-defined data types:

Table 1. Custom data types for use in your C programs
Data TypeDescription
r_shortsigned short (16 bit integer)
r_u_shortunsigned short (16 bit integer)
r_longsigned long (32 bit integer)
r_u_longunsigned long (32 bit integer)
r_longlongsigned longlong (64 bit integer)
r_u_longlongunsigned longlong (64 bit integer)
r_charPcharacter pointer (String)
rc_charconstant character
rc_charPconstant character pointer (String)
rc_shortconstant signed short (16 bit integer)
rc_u_shortconstant unsigned short (16 bit integer)
rc_longconstant signed long (32 bit integer)
rc_u_longconstant unsigned long (32 bit integer)
rc_longlongconstant signed longlong (64 bit integer)
rc_u_longlongconstant unsigned longlong (64 bit integer)
r_voidPvoid generic pointer
r_booleanOne of two values: the constant OK, or the constant NOTOK
r_errorUsed as a return value type. If OK, then no error. Any other value indicates an error.

Parent topic: C API