CONCAT¶
Concatenates two strings.
Signature¶
┌─────────┐
IN1 ─┤ │
│ CONCAT ├─ OUT
IN2 ─┤ │
└─────────┘
FUNCTION CONCAT : ANY_STRING
VAR_INPUT
IN1 : ANY_STRING;
IN2 : ANY_STRING;
END_VAR
END_FUNCTION
The return type matches the input type. CONCAT accepts STRING.
Both inputs must share the same type.
Inputs
Name |
Type |
Description |
|---|---|---|
|
|
The first string. |
|
|
The string to append to IN1. |
Outputs
Name |
Type |
Description |
|---|---|---|
Return value |
|
IN1 followed by IN2. Same type as the inputs. |
Description¶
Returns a new string formed by appending IN2 to the end of IN1.
Example¶
result := CONCAT('Hello', ' World'); (* result = 'Hello World' *)
result := CONCAT('A', 'B'); (* result = 'AB' *)
See Also¶
References¶
IEC 61131-3 §2.5.1.5.7