LEN¶
Returns the length of a string.
Signature¶
┌─────────┐
IN ─┤ LEN ├─ OUT
└─────────┘
FUNCTION LEN : ANY_INT
VAR_INPUT
IN : ANY_STRING;
END_VAR
END_FUNCTION
Returns INT. LEN accepts STRING.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
The string to measure. |
Outputs
Name |
Type |
Description |
|---|---|---|
Return value |
|
The number of characters in IN. Zero for an empty string. |
Description¶
Returns the number of characters in IN. For an empty string, the result is 0.
Example¶
result := LEN('Hello'); (* result = 5 *)
result := LEN(''); (* result = 0 *)
See Also¶
References¶
IEC 61131-3 §2.5.1.5.7