[<<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 a Clipper 5.0
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 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_AREPLACE( 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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson