A-4
○ Comparison operator
This operator can be used for the operand of the integer type and the real type.
The register of the bit type should come left. In the case to do the comparison
which uses ‘==’ or ‘!=’ for the operand of the integer bit type, the comparison
object should be an expression of true/false.
ex)
MB000010 = MW00002 != MW00003 OK
MB000010 = MF00002 < 99.99 OK
MB000010 = MW00002 >= MW00003 OK
MB000010 = MB000011 == true OK
MB000010 = MB000011 != 0 NG
MB000010 = MB000011 == 1 NG
○ Logic operator
This operator can be used only for the operand of the bit type.
ex)
MB000010 = MB000011 && MB000012 OK
MB000010 = !MB000011 OK
MB000010 = (MW000020 >= 50) && MB000011 OK
MB000010 = MW00001 || MW00002 NG
MB000010 = !MW00001 NG
○ Substitution operator
If it is a difference of the real type or the integer type even if a right,
left type is different, substitution is possible. However, the rounding error
is caused when substituting from the real type to the integer type.
Substitution for the bit type register can do only a logical value (bit type
register or true/false). In the case to substitute the values other than a logical
value for the bit type register, the values are compared with 0(Or, 0.0), and
the truth is converted into the substituted code. The substitution of the bit
type excluding the bit type register is assumed to be impossible.
ex)
MW00001 = MW00002 OK
ML00003 = MW00002 OK
MF00006 = MW00002 * 343 OK
MB000010 = MB000011 OK
Comentarios a estos manuales