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.
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.
CLEAR OPEN DATABASE (HOME(2) + 'Data\testdata') USE Customer ? 'Width of contact field: ' ?? LEN(contact) ? 'Width of cust_id field: ' ?? LEN(cust_id)