Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

LEN( ) Function

Determines the number of characters in a character expression, indicating the length of the expression.




Specifies the character expression for which LEN( ) returns the number of characters.

Numeric. LEN( ) returns the number of characters in a character expression.

The following example clears the main Visual FoxPro window using the CLEAR command and opens the Customer table in the sample Testdata database located in the Visual FoxPro ..\Samples\Data directory by using the OPEN DATABASE and USE commands. Combined with the ? and ?? commands, LEN( ) displays the number of characters in the fields, Cust_ID and Contact.

OPEN DATABASE (HOME(2) + 'Data\testdata')
USE Customer     
? 'Width of contact field: '
?? LEN(contact)
? 'Width of cust_id field: '
?? LEN(cust_id)

Community Additions

© 2015 Microsoft