Skip to content

Display of numerical values #40

@martin-henz

Description

@martin-henz

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions