TestFileNbr Determine the status of a file number. Short Name TSTFILNUM() Type Low-level function Declaration COUNT TestFileNbr(COUNT filno) Description TestFileNbr() returns zero if filno is not in use or returns FINT_ERR (47, c-tree Plus not initialized), FNUM_ERR (22, filno is out of range), or FUSE_ERR (46, filno is in use). TestFileNbr() does NOT set or change uerr_cod. Return
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Example COUNT retval;
printf("\nCould not initialize. Error %d.", retval);
else {
if ((retval = TestFileNbr(5)) == 0) {
if (OpenRFile(5, "MyFile.dat")) printf("\nCould not open files.");
{
else if (retval == 46) if (OpenRFile(-1, "MyFile.dat")) printf("\nCould not open files.");
if (CloseISAM()) printf("\nCould not close ISAM.");
} |
||||||||||||||||||