Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FlexFile Reference Guide - <b>v_ptr()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 V_PTR()
 Return the absolute offset (file pointer) of data stored in a DBV file
-------------------------------------------------------------------------------

 Syntax

    V_PTR( <cPointer> )   ->   nOffset

 Arguments

    <cPointer> is a six byte pointer-field (FlexFile's version of a
    memo-field).

 Returns

    V_PTR() returns the absolute offset of data pointed to by
    <cPointer> in the DBV file associated with <cPointer>.

 Description

    For those who use Clipper's FOPEN() class of functions and who
    would like direct access to the data in a DBV type file, FlexFile
    provides V_PTR(). However, it is far safer to use V_RETRIEVE() and
    V_POKE().

    It must be noted that extreme care should be exercised when
    writing data into the DBV file. You should never write data that
    begins before V_PTR() or data which extends beyond V_LEN().

     +------------------------- WARNING ---------------------------+ 
     | Extreme care must be taken when using FWRITE() on a DBV     | 
     | type file.  Overwriting the bounds of a VLF by one byte can | 
     | corrupt the entire file.                                    | 
     +-------------------------------------------------------------+ 


 Examples

    // Open a DBF file and its related DBV file.
    USE dbf_file
    V_USE( "dbv_file" )

    ? V_PTR( vlf )  // Result if the data related to vlf
                    // is 11,222 bytes from the beginning
                    // of dbv_file.dbv: 11222

See Also: V_RETRIEVE() V_POKE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson