共用方式為


LEN( ) Function

Returns the number of characters in a character expression.

LEN(cExpression)

Return Values

Numeric

Parameters

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

Remarks

Use LEN( ) to determine the length of a character expression.

Example

The following example opens the customer table in the testdata database. LEN( ) is used to display the widths of the cust_id and contact fields.

CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE Customer     && Open customer table

CLEAR
? 'Width of contact field: '
?? LEN(contact)
? 'Width of cust_id field: '
?? LEN(cust_id)

See Also

FSIZE( ) | TXTWIDTH( ) | LENC( ) Function