Applies To: |
|
Summary: |
Multiplication of numbers do not work in
CiVBA when the product is passed to a Single Precision or Double
Precision Variable. For example, if I multiply 3600*24 and pass the
product to a single or double variable, the product is returned as
zero or a a null. |
Solution: |
If you multiply the two numbers as 3600
and 24, the compiler will get two integer (2 byte variables) and
multiplying them together will produce a new integer (2 byte
variable) and this will overflow the size of the integer which is
32768. Changing your code to 3600.0 * 24.0 forces the compiler to do a floating point arithmetic. That should fix the problem. Citect has confirmed this to be a problem in CitectHMI/SCADA. We are researching this problem and will post new information here as it becomes available. |
Keywords: |
Related Links
Attachments