atto icon indicating copy to clipboard operation
atto copied to clipboard

Add ">", "<", ">=", and "<=" to core library

Open Nyhilo opened this issue 5 years ago • 3 comments

Added comparison operators to the full library as well as the is_neg function, which is a dependency of the comparison functions.

Also made a small change of if_num to is_num, to bring it into line with the other type-checking functions.

Nyhilo avatar Aug 01 '19 23:08 Nyhilo

That's a very clever hack! Just so you're aware, there are __less and __lesseq operators that are supported by the language, so these can be used to implement these operators.

zesterer avatar Aug 02 '19 11:08 zesterer

Oh nice. Without looking through the source code I just assumed all the internal operators were expressed in the core.at. This is good to know.

Nyhilo avatar Aug 02 '19 16:08 Nyhilo

core.at defines what it can, but there are certain intrinsic operators that the language simply can't function without. However, there aren't many of them.

zesterer avatar Aug 02 '19 17:08 zesterer