188
Function Descriptions
Appendix C
• Arguments and Return Values
• Example
MID: Extract Characters from Middle
• Function
Extracts the specified number of characters starting from the specified position of the specified text
string.
• Application
Return_value
:= MID
(Source_string, Number_of_characters, Position)
;
• Arguments and Return Values
• Example
CONCAT: Concatenate Strings
• Function
Joins the specified text strings.
Up to 31 text strings can be specified.
• Application
Return_value
:= CONCAT
(Source_string_1, Source_string_2, …)
;
• Arguments and Return Values
Variable name
Data type
Description
Source_string
STRING
Specifies the text string from
which to extract characters.
Number_of_characters
INT, UINT
Specifies the number of char-
acters to extract.
Return_value
STRING
Returns the extracted charac-
ters.
Variable name
Data type
Description
Source_string
STRING
Specifies the text string from which to
extract characters.
Number_of_characters
INT, UINT
Specifies the number of characters to
extract.
Position
INT, UINT
Specifies the position from which to start
extracting characters. The first character is
position “1” (e.g., position 1 is “A” in mes-
sage 1 in the following illustration).
Return_value
STRING
Returns the extracted characters.
Variable name
Data type
Description
Source_string_1
STRING
Specifies a text string to be joined.
Source_string_2
STRING
Specifies a text string to be joined.
:
Return_value
STRING
Returns the joined text strings.
A
B
C
D
E
F
G
H
Message
Variables
STRING Message
STRING Result
Result:=RIGHT(Message,3);
→
"FGH" is stored in the
Result
variable.
Message
Variables
STRING Message
STRING Result
Result:=MID(Message,3,2);
→
"BCD" is stored in the
Result
variable.
A
B
C
D
E
F
G
H
Summary of Contents for CX-PROGRAMMER V8.1
Page 3: ...iv...
Page 5: ...vi...
Page 7: ......
Page 15: ...xvi...
Page 19: ...xx...
Page 25: ...xxvi Application Precautions 4...
Page 26: ...Part 1 Function Blocks...
Page 27: ......
Page 153: ...128 Procedures Section 3 2...
Page 154: ...Part 2 Structured Text ST...
Page 155: ......
Page 159: ...134 CX Programmer Specifications Section 4 2...
Page 205: ...180 Procedures Section 6 1...
Page 207: ...182 System defined external variables supported in function blocks Appendix A...
Page 229: ...204 Revision History...
Page 230: ......