JavaScript Editor js editor     Web development 



Main Page

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

LEN(cExpression)

Parameters

cExpression


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

Return Value

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

Example

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.

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

See Also



JavaScript Editor js editor     Web development 
R7