Omron NS-RUNTIME - SOFTWARE User Manual page 77

Ns-runtime software
Hide thumbs Also See for NS-RUNTIME - SOFTWARE:
Table of Contents

Advertisement

STRCMP(W),
STRICMP(W)
Applicable versions
Format
Function
Return Value
Example
STRLEFT(W)
Applicable versions
Format
Function
Return Value
Example
STRLEN(W)
Applicable versions
Format
Function
Return Value
Example
STRLTRIM(W)
Applicable versions
Format
Function
Return Value
Example
String Comparison
System Version 6.6 or higher
STRCMP(S1,S2)
STRICMP(S1,S2)
STRCMPW(S1,S2) STRICMPW(S1,S2)
Compares the string.
STRCMP(W)
Case sensitive
STRICMP(W)
Not case sensitive
0:
Agree
-1: Disagree. Character code S1 is smaller than character code S2.
1:
Disagree. Character code S1 is greater than character code S2.
STRCPY($W0, "ABC");
$W10= STRCMP($W0, "DEF"); 'Compare ABC and DEF. Character code
A, 0 x 41 < Character code D, 0 x 44. Thus the return value , -1, is stored in
$W0.
Extracts the specified number of characters from leftmost characters
of a string
System Version 6.6 or higher
STRLEFT(D,S,n),
--- ASCII code
STRLEFTW(D,S,n) --- Unicode
Stores n characters from the left of the string S to D.
None
STRLEFT($W0,"ABCDEFG",3);
'Extract 3 characters (ABC) from the leftmost string and store ABC in $W0
and $W1.
Gets string length
System Version 6.6 or higher
STRLEN(S)
--- ASCII code
STRLENW(S)
--- Unicode
Returns the length of the string S (The number of bytes of S).
String Length (The number of bytes of S).
STRCPY($W0, "ABC");
$W10 = STRLEN($W0);
'Set 3 to '$W10
Deletes the leftmost spaces of a string
System Version 6.6 or higher
STRLTRIM(D,S)
--- ASCII code
STRLTRIMW(D,S) --- Unicode
Deletes the leftmost space of the string S to enter it to D.
None
STRLTRIM($W0, "
'Store ABC in $W0 to $W1.
--- ASCII code
--- Unicode
'Set ABC to $W0 to $W1.
ABC");
4-5 Macros
4-21

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ns-nsrcl series

Table of Contents