puffnfresh / roy

Small functional language that compiles to JavaScript.
http://roy.brianmckenna.org/
MIT License
834 stars 74 forks source link

Support for scientific notated numbers? #180

Closed LarryBattle closed 11 years ago

LarryBattle commented 11 years ago

Does Roy support scientific notated numbers?

Example: Roy:

console.log 1E32

Output JS

(function() {
console.log(1, E32);
})();

Output:

ReferenceError: E32 is not defined

Used http://roy.brianmckenna.org/

joneshf commented 11 years ago

The version that is on the site is a bit outdated. There was support for lowercase e up until now. I've just added uppercase E as well as + in the exponent. Until we get a more current version up on the site, you can clone this repo and have support for scientific notation.

puffnfresh commented 11 years ago

Website has been updated, example now works.

LarryBattle commented 11 years ago

Thanks for your hard work. It works now. :+1: