View Issue Details

IDProjectCategoryView StatusLast Update
0031161RunnerGeneralPublic2019-09-06 18:42
ReporterScott DunbarAssigned ToRussell Kay 
PriorityLowSeverityC - GeneralReproducibility100%
Status ClosedResolutionFixed 
Product Version2.2.3 
Target Version2.2.4Fixed in Version2.2.4 
Summary0031161: General: The constant 0.5 evaluates to true when part of a boolean expression

If (0.5) evaluates to false. This is consistent with the GMS2 documentation that says values > 0.5 is true.
if (not 0.5) evaluates to false as well. If 0.5 was false, then "not 0.5" should have been true.
if (0.5 or false) evaluates to true. If 0.5 was false, then this expression should have been equivalent to "false or false".

It would seem that the value 0.5 evaluates to false if used by itself in an `if` statement. But evaluates to true any time it is part of a boolean expression. There is some inconsistency here in the truthiness of 0.5.
Steps To Reproduce1. Import project
2. Run project
3. Observe results shown in message boxes
TagsNo tags attached.
1.4 Found In
2.x Runtime Found In2.2.3.344
2.x Runtime Verified In9.9.1.1531


Scott Dunbar

2019-07-11 10:12


half_true.yyz (12,532 bytes)

Russell Kay

2019-07-12 14:34

Manager   ~0064410

Fixed in gitlab - compiler optimisations for constants in boolean expressions were incorrect for some conversions