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:

    Nowadays people’s visual imagination is so much more sophisticated, so much more developed, particularly in young people, that now you can make an image which just slightly suggests something, they can make of it what they will.
    Robert Doisneau (b. 1912)

    It is easier to move rivers and mountains than to change a person’s basic nature.
    Chinese proverb.