12-04-2019 12:06 PM - edited 12-04-2019 12:27 PM
@Nodrael wrote:
As I mentioned above the program itself works fine.
Then the code should look as follows (I remove the additional changes I made). Still much simpler!
@Nodrael wrote:
The problem occurs only when it's needed to compare the value contained in "wavelength to" indicator with the preset one. If you try to create a double numeric control and write there, for instance, 359, it will not be equal to 359 in the indicator. That was the original problem.
It will be very, very close, but as has been mentioned several times, equal comparisons with floating point numbers are often invalid due to their nature. For example 0.1 cannot be represented in binary with a finite number of bits.
Here's how it looks when you show more decimal digits:
You really need to learn how to present a problem. For example nobody can really guess what the notation "270 =/= 270" actually means. Your posts contain way too much irrelevant detail.