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_len()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 V_LEN()
 Return the length of data stored in a DBV
-------------------------------------------------------------------------------

 Syntax

     V_LEN(  <cPointer>,
             <nArea> | <cAlias> )   ->   nCount

 Arguments

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

    <nArea> or <cAlias> refers to the number or name of the target DBV
    work area. If not specified, the current DBV work area is assumed.


 Returns

    V_LEN() returns the length of a character string or the number of
    elements in an array as a numeric integer.  V_LEN() returns only
    the number of elements in the first dimension of an array.

 Description

    With a character string, V_LEN() returns the number of bytes of
    the data associated with <cPointer>. This count will include any
    imbedded null bytes (CHR(0)).

    With an array, V_LEN() returns the number of elements in the first
    dimension of the array.

    For all other data types, V_LEN() returns 0.


 Examples

    // Declare and assign two local variables to be used.
    LOCAL cString, aNames := { "Sandra", "Beth", "Pirko" }
    cString = "This is a test"

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

    // Store a string to record 1 and an array to record 2
    REPLACE vlf WITH V_REPLACE( cString, vlf )
    SKIP
    REPLACE vlf WITH V_REPLACE( aNames, vlf )

    GO TOP
    ? V_LEN( vlf )        // Result: 14
    SKIP
    ? V_LEN( vlf )        // Result: 3


See Also: V_TYPE() V_REPLACE() V_RETRIEVE() V_FILLARR()

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