elikaski / BF-it

A C-like language to Brainfuck compiler, written in Python
MIT License
121 stars 11 forks source link

Added a warning if for loop variable isn't assigned to anything #56

Closed NeeEoo closed 3 years ago

NeeEoo commented 3 years ago

This happened to me where i didn't figure out why it wasn't working after adding a print call.

int main() {
    print("\033[m"); // Removing this line makes the program work
    //       V Here is the issue
    for(int i; i != 26; i++) {
        for(int j = 0; j != 10; j++) {
            print("\033[48;5;");
            printint(10*i + j);
            print("m \033[m");
        }
        printchar('\n');
    }
}
abhra2020-smart commented 3 years ago

QUESTION: Does this language support color codes?

NeeEoo commented 3 years ago

If the terminal you are using supports it, then it works.

elikaski commented 3 years ago

Hah, I didn't know the PyCharm terminal supports colors, that's pretty cool! Anyways, good find :) Thank you