LEN Function Details Syntax LEN(stringexpression) LEN(variable) In the first form, LEN returns the number of characters in the argument stringexpression. The second syntax returns the number of bytes required by a BASIC variable. This syntax is particularly useful for determining the correct record size of a random-access file.