gtpc2mhs | C/C++ Language Support User's Guide |
This function determines whether TPF collection support (TPFCS) has stored the collection on the TPF database in EXTENDED format or COMPACT format.
Format
#include <c$to2.h> BOOL TO2_isExtended (const TO2_PID_PTR pid_ptr, TO2_ENV_PTR env_ptr);
Normal Return
A value of TO2_IS_TRUE is returned if the collection is stored on the TPF database in EXTENDED format. If the collection is not stored in EXTENDED format, a value of TO2_IS_FALSE is returned.
Error Return
An error return is indicated by a zero. When zero is returned, use the TO2_getErrorCode function to determine the specific error code. For more information, see Error Handling.
The following error code is common for this function:
TO2_ERROR_ENV
TO2_ERROR_PID
Programming Considerations
Examples
The following example determines if the collection resides on the TPF database in EXTENDED format.
#include <c$to2.h> /* Needed for TO2 API functions */ #include <stdio.h> /* APIs for standard I/O functions */ TO2_ENV_PTR env_ptr; /* PTR to the TO2 environment */ TO2_PID collect; /* PTR to PID return field */
·
·
·
if ((TO2_isExtended(&collect, env_ptr)) == TO2_IS_FALSE) { printf("This is not an EXTENDED collection! \n"); } else { printf("This is an EXTENDED collection! \n"); }
Related Information