You are browsing as a guest. Sign up (or log in) to start making projects!

3h 13m 36s logged

Fixed a lot of bugs with when expressions, also got deepseek to fix some of them

Added If expressions, which allow using if statements inside other expressions, for example, here is some previously invalid code that is now valid:

int max = if (a > b) a else b;
str  message = if (score >= 90) {
    looks::say("something");
    "You win!"
} else {
    looks::say("something");
    "You lose :("
}

 triangles[15] = Triangle(
        utils::random(-240, 240),
        utils::random(-180, 180),
        utils::random(-240, 240),
        utils::random(-180, 180),
        utils::random(-240, 240),
        if(mode == TriangleRenderMode.OFF) {
            5
        } else {
            triangles[14].y3
        }
    );

These still get lowered properly and just look like normal if statements in the final scratch code

0
8

Comments 0

No comments yet. Be the first!