riolet / rix

Rix language combines the power of C language and the convenience of a high level language
GNU General Public License v3.0
729 stars 27 forks source link

boolean logic (&&, ||) don't work #18

Closed JoePelz closed 9 years ago

JoePelz commented 9 years ago

if statements work fine with a single simple condition to check but combining multiple conditions with && and || operators fail. e.g.

if a == b && b == c
  doStuff

workaround:

if a==b
  if b==c
    doStuff
JoePelz commented 9 years ago

operators && and || have now been implemented as of commit 5576bcaa6a700fee36064239d09bfbfe739f6779 Until precedence is implemented, the boolean statements must be surrounded by parentheses. i.e.:

//do this
if (1<2) && (3<4)
//and not this
if 1<2 && 3<4