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

Garbage value when declare a variable inside of a for loop #81

Closed
MilkeeyCat opened this issue Oct 12, 2024 · 0 comments
Closed

Garbage value when declare a variable inside of a for loop #81

MilkeeyCat opened this issue Oct 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@MilkeeyCat
Copy link
Owner

fn printf(format: *i8, _: usize) -> void;
fn main() -> u8 {
    for let i: u8 = 0; i < 2; i = i + 1 {
        let value: usize = i as usize;

        printf("%d\n", value);
    }
}
-31797248
-31797247
@MilkeeyCat MilkeeyCat added the bug Something isn't working label Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant