jeudi 7 février 2019

ERLANG + IF + BOOLEAN

Boolean x = true;
int y = 1;
int z = 1;
if(y ==1 && x == true){
    z++;
    x = false;
}
else{
    z--;
    x = true;
}

I want to do this in erlang.. How Can I do this? (Please be noted that this is a example code. What I want to do are two conditions in one if statement & this boolean functionality). Any help is welcomed.Actually z-- & z++ are not needed.

Aucun commentaire:

Enregistrer un commentaire