Forum

Please note that you can subscribe to the individual forums. A subscription for news only covers the news.

Time variable 20:30...
 
Notifications
Clear all

Time variable 20:30 bug report

1 Posts
2 Users
0 Likes
245 Views
0
Topic starter

Hi,

Below is the sample code to show the problem. Something wrong when I set time variable to 20:30 and compare it. Thank you very much.

[General]
MinVersion=4.3.3
Version=0.0.1
Master=Master
SubName=slave
DefaultStatus=Ready

[Status-Ready]

; If I set var1 to 20:30, it does not work.
; But I set var1 to 20:40, it will work.
; It seems that it only happens when the time variable is around 20:30
[Report-Show bug]
Set!=!var1,20:30
Procedure=bug

[Procedure-bug]
If=!var1=20:30
Message=This message should be shown but it is not.

PS: This is my first post to this forum, and I have tried Virtual Master for a few months. I must take this opportunity to say Thank You to you for building such a nice application for us. 🙂

1 Answer
0

Thank you for the kind words. And for a very well documented bug report. 

The problem here is that a time variable is not exact. It is stored internally as a number with decimals (actually as fractions of a day). And that means that some rounding (on very small decimals) are going on. Which can affect the comparison. If you test greater than or less than, it will work fine. But equal I cannot guarantee. 

There is nothing I can do to change this. But maybe I should put a warning in the manual that time variables are not 100% exact. 

Sven