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

Assembler error on array of large numbers #1207

Open
riknoll opened this issue Feb 2, 2022 · 0 comments
Open

Assembler error on array of large numbers #1207

riknoll opened this issue Feb 2, 2022 · 0 comments
Labels

Comments

@riknoll
Copy link
Member

riknoll commented Feb 2, 2022

Reported on the forum here: https://forum.makecode.com/t/2d-array-works-but-then-not/12006

For some reason the assembler doesn't seem to like arrays with a bunch of large numbers. This does not repro in arcade or micro:bit; just adafruit. The fix is probably just to update PXT

Here's a minimal repro:

let array2D = [
    16515072, 14164992, 11553792, 8942592, 6331392, 3981312, 1370112, 60432, 50232, 40032, 30852, 20652, 10452, 2359512, 4718772, 7340172, 9961572, 12582972, 14942232,
    16711680, 14622720, 12533760, 10444800, 8421376, 6332160, 4243200, 2154240, 65280, 57120, 48960, 40800, 32896, 24735, 16575, 8415, 255, 2097375, 4194495, 6291615, 8388736
];

console.log(array2D.length)

Note that you have to try and download to hardware to get the error to show up.

@riknoll riknoll added the bug label Feb 2, 2022
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