Open MiranDMC opened 7 months ago
because of the way data is handled in the script you could only evaluate this data as such:
that's all. by default all variables are set to 0.
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.)