View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0031492||2.x IDE Bugs||General||Public||2019-11-15 10:52||2020-01-13 17:05|
|Reporter||Alice||Assigned To||Russell Kay|
|Priority||Medium||Severity||C - General||Reproducibility||100%|
|Platform||Windows||OS||Windows 10||OS Version|
|Target Version||Fixed in Version|
|Summary||0031492: Functions: Boolean variables are treated as "numbers" by is_bool() and typeof()|
When checking a boolean variable with the functions is_bool() and typeof(), the variable is recognised as a number instead of a boolean, as you can see in the attached screenshot.
You actually have to do an expression which results in a boolean in order to get "bool" to be returned, e.g. "typeof(1==1)". However, the manual makes no mention that you can write expressions in this function, and does say it should determine the variable passed-in, as we were trying.
Boolean variables are identified as such by these functions.
|Steps To Reproduce||1-Launch the IDE|
2-Open the project attached
3-Run the project
4-Observe the issue
|Tags||No tags attached.|
|2.x IDE Found In||220.127.116.115|
|2.x Runtime Found In||18.104.22.1685|
|2.x IDE Verified In|
|2.x Runtime Verified In|
Functions-BoolsTreatedAsNumbers.png (15,707 bytes)
Functions-BoolsTreatedAsNumbers.png (15,707 bytes)Functions-BoolsTreatedAsNumbers.yyz (20,478 bytes)
||This is not a bug for backward compatibility reasons...|
||Closing as per the above comment.|