Skip to content

Compiler's string -> number conversion has unfortunate side effects with variable monitor rounding #287

@GarboMuffin

Description

@GarboMuffin

(This is a long-standing compiler issue; not a regression from the new compiler.)

These projects display differently when compiled

https://scratch.mit.edu/projects/1219497763/

https://scratch.mit.edu/projects/1219599142/

Not clear if anything can be done to fix that aside from telling people to use the join block if they need a string. Maybe don't do conversion if there's more than 6 decimals, but that seems likely to slow down any projects storing mathematical constants in variables. Or maybe we can just make the variable monitors not round, but then that will cause breakage in the other direction when they display 0.30000000000000004 instead of 0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions