0

Plz explain this line

X = (z= = - -a)? B:z

24th Oct 2018, 9:28 PM
Lailuma Norani
Lailuma Norani - avatar
2 odpowiedzi
+ 5
i'm not sure because of the space but if its X=(z==--a)?B:z; its same as if(z == --a) X=B; else X=z;
24th Oct 2018, 9:34 PM
Taste
Taste - avatar
0
that is what is known as the teritary operator. it means "if (first term){ second term }else{ third term } z== --a means "does z equal a - 1?"
25th Oct 2018, 8:47 PM
sillica sandwhich
sillica sandwhich - avatar