Delta AH500 — 6.1.2 Explanation of Comparison Instructions

AH500 Programming Manual 4. When the lengths of the strings are the same, but their contents are different, the first different values (ASCII codes) met in the strings are compared. For example, the string in S 1 is “ABCDF”, and the string in S 1 is “ABCDE”. The first different values met in the strings are “F” (16#46) and “E” (16#45). Owing to the fact that 16#46 is greater than 16#45, the string in S 1 is greater than that in S 1 . The corresponding comparison operation results of the instructions are listed below. b15 b8 b7 b0 Comparison sign b15 b8 b7 b0 S1 S1 +1 S2 S2 +1 S1 +2 S2 +2 " " ABCDF " " ABCDE 5.

When the lengths of the strings are different, the string whose length is longer is greater than the string whose length is shorter. For example, the string in S 1 is “1234567”, and the string in S 2 is “99999””. Owing to the fact that the string in S 1 is composed of 7 characters, and the string in S 2 is composed of 5 characters, the string in S 1 is greater than the string in S 2 . The corresponding comparison operation results of the instructions are listed below.

S1 b15 b8 b7 b0 Comparison sign S2 b15 b8 b7 b0 S1 +1 S2 +1 S1 +3 S1 +2 S2 +2 " " 1234567 " " 99999 6-17 Comparison symbol Comparison operation result $= ON $<> OFF $> OFF $>= ON $< OFF $<= ON 16#42(B) 16#41(A) 16#44(D) 16#00 16#43(C) 16#46(F) 16#42(B) 16#41(A) 16#44(D) 16#00 16#43(C) 16#45(E) Comparison symbol Comparison operation result $= OFF $<> ON $> ON $>= ON $< OFF $<= OFF 16#32(2) 16#31(1) 16#34(4) 16#33(3) 16#36(6) 16#35(5) 16#00 16#37(7) 16#39(9) 16#39(9) 16#39(9) 16#39(9) 16#00 16#39(9) Comparison symbol Comparison operation result $= OFF $<> ON $> ON $>= ON