dimanche 7 août 2016

vala logical operations don't work

I'm making a program and I am making an 'if' statement, which I want to have many boolean expresions altogether using 'or' between them. But I can't make out how. My code:

if (input == "hello"* || input == "hi"*) {
        output = "Hi!";
};

and the error I get:

Roxanne.vala:33.31-33.32: error: syntax error, expected identifier
        if (input == "hello"* || input == "hi"*) {
                              ^^
Compilation failed: 1 error(s), 0 warning(s)

What am I doing wrong?

Aucun commentaire:

Enregistrer un commentaire