Len (programming)

Len (programming)

Many common programming languages operate on strings using string functions. One of the major string functions Len, returns the length of a specific string.

This function is called Len, which stands for length, in the BASIC programming language and its derivatives such as Visual Basic. It is called strlen in the C programming language and its derivatives such as PHP. In some other programming languages, the entire word "length" is written out as the name of the function. "For other languages see string functions. "

Usage in Visual Basic

In Visual Basic, the prototype of the Len function is as follows:

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.


Wikimedia Foundation. 2010.

Игры ⚽ Поможем написать реферат

Look at other dictionaries:

  • Len — may refer to: * Len (band), a Canadian rock group * Len (programming), a function that gives the length of a text string in some dialects of BASIC programming language * Len (Tsukihime), a fictional character from the visual novel Tsukihime by… …   Wikipedia

  • Comparison of programming languages (array) — Programming language comparisons General comparison Basic syntax Basic instructions Arrays Associative arrays String operations …   Wikipedia

  • Comparison of programming languages (basic instructions) — Programming language comparisons General comparison Basic syntax Basic instructions Arrays Associative arrays String operations …   Wikipedia

  • Comparison of programming languages (string functions) — String functions redirects here. For string functions in formal language theory, see String operations. Programming language comparisons General comparison Basic syntax Basic instructions Arrays …   Wikipedia

  • Clarion (programming language) — For other uses, see Clarion. Clarion Developer(s) JPI, Clarion International, SoftVelocity Stable release 8.0 / August 30, 2011; 2 months ago (2011 08 30) Operating system …   Wikipedia

  • Polymorphism in object-oriented programming — In simple terms, polymorphism is the ability of one type, A, to appear as and be used like another type, B. In strongly typed languages, this usually means that type A somehow derives from type B, or type A implements an interface that represents …   Wikipedia

  • Text Executive Programming Language — In 1979, Honeywell Information Systems announced a new programming language for their time sharing service named TEX, an acronym for the Text Executive processor. TEX was a first generation scripting language, developed around the time of AWK and …   Wikipedia

  • Comparison of Object Pascal and C — Programming language comparisons General comparison Basic syntax Basic instructions Arrays Associative arrays String operations …   Wikipedia

  • C++ — У этого термина существуют и другие значения, см. C. См. также: Си (язык программирования) C++ Семантика: мультипарадигмальный: объектно ориентированное, обобщённое, процедурное, метапрограммирование Тип исполнения: компилируемый Появился в …   Википедия

  • Leonard H. Tower Jr. — Infobox Scientist name = Leonard H. Tower Jr. caption = Len Tower wearing League for Programming Freedom and No Smoking badges (c. 1996) birth date = birth date and age|1949|6|17 birth place = Astoria, Queens, New York, New York, U.S. residence …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”