LENGTH Function                                                                                                                       

Returns the number of elements in the array or the length of a string if the expression is not an array

 

LENGTH(expression)

 

Arguments

expression      See Remarks below

 

Remarks

expression = Integer or String Array. Returns length of the array. If the array have not been initialised then an error is thrown.

expression = String. Returns length of the string. If the array has not been initialised then an error is thrown.

expression = Bus. Returns length of the bus.

 

Example

 DIM Data[] as String

 DIM value as integer

 OPEN TEXT,"C:\Data\Messages.Txt",Data        

 value = LENGTH(Data)                // value contains the number of Lines Read

 value = LENGTH(Data[0])            // value contains the number of characters in the string Data[0]