yodk icon indicating copy to clipboard operation
yodk copied to clipboard

Exponentials and Hexadecimals

Open Oloneus opened this issue 2 years ago • 4 comments

Describe the bug Yolol accepts hexadecimal and exponential constants. Yodk does not.

Example code

a=1e6 b=0xF4240
a=1000000 b=1000000

Yodk results Yodk marks these as errors, even tho, Yolol can use it

Oloneus avatar Jun 14 '22 08:06 Oloneus

Well, that's a fascinating discovery. It seems like nobody else has ever noticed before that yolol supports hex and scientific notation for number-constants.

You are right, York should support this. I won't have the time for this in the next few days, but maybe in a week or so I'll give it a try.

dbaumgarten avatar Jun 15 '22 19:06 dbaumgarten

Support for hex and exponential numbers has been added with v0.1.13. I am pretty sure that there are some edge-cases where the game behaves differently, but it's a start. If you find any issues with this, just reply here and I will reopen the issue.

dbaumgarten avatar Jun 26 '22 14:06 dbaumgarten

It looks like you haven't added support for hexadecimal exponentials? e.g. 0x1AFP2 == 0x1AF * 2^2 == 1724

See documentation here for atof which is what we assume it's using.

Here's a screenshot from the game as proof:

Code Result

martindevans avatar Jun 26 '22 23:06 martindevans

You got to be kidding me... Hexadecimal exponent-notation?! What the actual fuck?!

I am absolutely sure that his was never an intended feature in YOLOL. They just used atof and never bothered to read it's documentation...

dbaumgarten avatar Jun 30 '22 11:06 dbaumgarten