Download Print this page

Omron NS Reference Manual page 63

Hide thumbs Also See for NS:

Advertisement

Section2 Functions
NS series Macro Reference
STRCMP(W), STRICMP(W)
Applicable versions
Format
Function
Return Value
Example
STRLEFT(W)
Applicable versions
Format
Function
Return Value
Example
String Comparison
System Version 6.6 or higher
STRCMP(S1,S2) STRICMP(S1,S2) ・・・ASCII code
STRCMPW(S1,S2) STRICMPW(S1,S2) ・・・Unicode
Compares the string.
STRCMP(W)
Case sensitive
STRICMP(W)
Not case sensitive
-1
: Disagree, S1<S2
0
: Agree, S1=S2
1
: Disagree, S1>S2
STRCPY($W0, "ABC");
$W10= STRCMP($W0, "DEF"); 'Compare ABC and DEF. The result, -1, is stored
in $W10.
Extracts the specified number of characters from leftmost characters
of a string
System Version 6.6 or higher
STRLEFT(D,S,n),
STRLEFTW(D,S,n)
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 to $W1.
'Set ABC to $W0 to $W1.
・・・ASCII code
・・・Unicode
43

Advertisement

loading

This manual is also suitable for:

Ns-series