◄Relational Operators► ◄Contents► ◄Index► ◄Back► ────────────────────────────────────────────────────────────────────────────── Files with the .EXE extension contain more efficient code that may change the way single- and double-precision values are compared. For example, the following fragment prints Equal when run in the QBX environment, but prints "Not Equal" when compiled: B!=1.0 A!=B!/3.0 IF A!=B!/3.0 THEN PRINT "Equal" ELSE PRINT "Not Equal" Because the compiled version makes more extensive use of a math coprocessor chip (or coprocessor emulation), A! and B!/3.0 are slightly different values. You can avoid problems in comparisons by performing calculations outside comparisons. The following rewritten fragment produces the same results whether you run it under QBX or compile it: B!=1.0 A!=B!/3.0 Tmp!=B!/3.0 IF A!=Tmp! THEN PRINT "Equal" ELSE PRINT "Not Equal"