VDataLength Get length of variable-length data record. Short Name GTVLEN() Type Low-level variable-length data file function Declaration VRLEN VDataLength(COUNT datno, LONG recbyt) Description VDataLength() returns the total length of the variable-length data record beginning at byte offset recbyt in file datno. Return If no error occurs, VDataLength() returns the total record length for the specified offset. When VDataLength() returns a zero, check uerr_cod. If uerr_cod is zero, the record length is zero. Otherwise, an error occurred as follows:
See c-tree Plus Error Codes for a complete listing of valid c-tree Plus error values. Example LONG pntr; VRLEN vreclen; COUNT datno,keyno; TEXT key_buffer[64];
vreclen = VDataLength(datno,pntr); if (uerr_cod == 0) {
if (vreclen) printf( "\nFirst variable record by key requires %d bytes", vreclen); else printf("\nRecord length is zero.");
} else printf("\nError %d getting length.", uerr_cod);
} See also VRecordLength() |
||||||||||||||||||||||||