Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exponentials and Hexadecimals #124

Open
Oloneus opened this issue Jun 14, 2022 · 4 comments
Open

Exponentials and Hexadecimals #124

Oloneus opened this issue Jun 14, 2022 · 4 comments

Comments

@Oloneus
Copy link

Oloneus commented Jun 14, 2022

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

@dbaumgarten
Copy link
Owner

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 added a commit that referenced this issue Jun 26, 2022
@dbaumgarten
Copy link
Owner

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.

@martindevans
Copy link

martindevans commented Jun 26, 2022

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

@dbaumgarten
Copy link
Owner

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 dbaumgarten reopened this Jun 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants