ex.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
LEN Function Example
                        Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
' This example uses the LEN function to print the length of a string and the
' size in bytes of several types of variables.
 
 CLS                                ' Clear screen
 TYPE EmpRec
     EmpName AS STRING * 20
     EmpNum AS INTEGER
 END TYPE
 DIM a AS INTEGER, B AS LONG, C AS SINGLE, D AS DOUBLE
 DIM E AS EmpRec
 PRINT "A string:"; LEN("A string.")
 PRINT "Integer:"; LEN(a)
 PRINT "Long:"; LEN(B)
 PRINT "Single:"; LEN(C)
 PRINT "Double:"; LEN(D)
 PRINT "EmpRec:"; LEN(E)
 END