Skip to main content

7.9.1 LEN

Function

LEN is called the string length, which means you can get the length of the current string, and OUT outputs the length of the string

LD graphics

alt text

Parameter description

Interface variableDeclarationData typeDescription
INInputSTRINGString
Function nameReturn valueINTString length

Corresponding syntax

  • IN: Input string
  • OUT: The length of the currently entered string

Example

  • LD sample animation is as follows:

alt text

  • ST example is shown in the following code:
OUT:=LEN(IN1);