The LEN() function returns the length of a string. The LENS() function is similar to LEN() but operates on successive elements of a dynamic array, returning a similarly structured dynamic array of results.
The LEN() function returns the length of string (number of characters) including any trailing spaces. On ECS mode systems, this may not be the same as the number of screen positions required to display the string as some ECS characters are double width.
DISPLAY "Enter account number: "
WHILE LEN(ACCOUNT.NO) # 6
PRINTERR "Invalid account number"
This program fragment prompts for and inputs an account number. If it is not six characters in length, an error is displayed and the prompt is repeated.