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

Display of numerical values #40

Open
martin-henz opened this issue Apr 16, 2024 · 0 comments
Open

Display of numerical values #40

martin-henz opened this issue Apr 16, 2024 · 0 comments
Labels

Comments

@martin-henz
Copy link
Member

martin-henz commented Apr 16, 2024

In Python §1, Python integers are represented by JS big ints, and Python floating point numbers by JS numbers (doubles). The display of values in the REPL should reflect this: We should append ".0" to JS numbers when we print them, in case JS stringify makes them look like integers:

print(100.000)

should show

100.0

in the REPL.

This should be doable with the new multi-language support in js-slang, see https://github.com/source-academy/js-slang/pull/1651/files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant