aqua icon indicating copy to clipboard operation
aqua copied to clipboard

Logical expressions inside if statement

Open coder11 opened this issue 4 years ago • 0 comments

If would be nice to have logical expressions inside if statement. For example:

func ifElseNumCall(condition1: u32, condition2: u32):
    if condition1 == 1 and condition2 == 2:
        Println.print("it is 1 and  2")
    else:
        Println.print("it is not 1 and 2")

or

func ifElseNumCall(condition1: u32, condition2: u32):
    if condition1 == 1 or condition2 == 2:
        Println.print("it is either 1 or  2")
    else:
        Println.print("it is neither 1 nor 2")

coder11 avatar Apr 22 '21 11:04 coder11