You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please introduce implicit style cast to bool for branching statements, based on new is_truthy opcode. not keyword should also be supported.
Example:
int isOk, error
(...)
if and
isOk
not error
then
would be compiled to:
if and
is_truthy {value} 0@
not is_truthy {value} 1@
then
Please note is_truthy supports all variable types (including strings) and immediate values (constants). All of these are desirable as condition in branching.
New behavior should be applicable to all branching constructs (if, while, repeat, etc.)
The text was updated successfully, but these errors were encountered:
That's how the is_truthy works now. In other languages there are more values treated as false (float NaN for example), but it is not always possible to tell what type the variable data is in SCM.
Please introduce implicit style cast to bool for branching statements, based on new
is_truthy
opcode.not
keyword should also be supported.Example:
would be compiled to:
Please note
is_truthy
supports all variable types (including strings) and immediate values (constants). All of these are desirable as condition in branching.New behavior should be applicable to all branching constructs (if, while, repeat, etc.)
The text was updated successfully, but these errors were encountered: