Len (programming) - Use in Visual Basic

Use in Visual Basic

In Visual Basic, the prototype of the Len function is this:

Function Len (ByVal Str As String)

An example below shows an example of the use of Len function.

Sub Main Dim Str As String Dim Int As Integer Str = InputBox("Enter a string") Int = Len(Str) MsgBox(CStr(Int)) End Sub

This function reads a string from an input box and outputs its length.

For example, the input "Hello!" will output 6.

Read more about this topic:  Len (programming)

Famous quotes containing the words visual and/or basic:

    I may be able to spot arrowheads on the desert but a refrigerator is a jungle in which I am easily lost. My wife, however, will unerringly point out that the cheese or the leftover roast is hiding right in front of my eyes. Hundreds of such experiences convince me that men and women often inhabit quite different visual worlds. These are differences which cannot be attributed to variations in visual acuity. Man and women simply have learned to use their eyes in very different ways.
    Edward T. Hall (b. 1914)

    It is a strange fact that freedom and equality, the two basic ideas of democracy, are to some extent contradictory. Logically considered, freedom and equality are mutually exclusive, just as society and the individual are mutually exclusive.
    Thomas Mann (1875–1955)