omron — StrCompare

Appendix: Built-in Scripting Language Examples Str2Asc This function onverts a character to its corresponding Unicode character code. Syntax Str2Asc( strChar ) strChar The character to be converted. Returned value Returns the Unicode character code (in decimal) for the specified character. Notes Although the name of this function implies it only supports ASCII characters, it is in fact a legacy of previous versions of the software. The current version supports the full Unicode character set. Examples StrCompare Compares two strings to see if they are identitical. Syntax StrCompare( strValue1 , strValue2 ) strValue1 strValue2 A string, or a tag of String type.

This is the first string in the comparison. A string, or a tag of String type. This is the second string in the comparison. Returned value Examples InduSoft Web Studio Page 467 Tag Name Expression Tag Str( 321654.987 ) // Returned value = "321654.987" Tag Str( 5.65896246 ) // Returned value = "5.658962" Function Group Execution Windows Embedded Thin Client Str2Asc String Synchronous Supported Supported Supported Tag Name Expression Tag Str2Asc( "C" ) // Returned value = 67 Tag Str2Asc( "o" ) // Returned value = 111 Function Group Execution Windows Embedded Thin Client StrCompare String Synchronous Supported Supported Supported −1 The value of strValue1 is less than the value of strValue2.

0 strValue1 and strValue2 are identical. 1 The value of strValue1 is greater than the value of strValue2. Tag Name Expression Tag StrCompare( "Text1", "Text2" ) // Returned value = #1