比较运算符
运算符 说明 例子== is equal to 5==8 returns false
!= is not equal 5!=8 returns true
> is greater than 5>8 returns false
< is less than 5<8 returns true
>= is greater than or equal to 5>=8 returns false
<= is less than or equal to 5<=8 returns true
逻辑运算符
运算符 说明 例子&& and x=6
y=3
(x < 10 && y > 1) returns true
|| or x=6
y=3
(x==5 || y==5) returns false
! not x=6
y=3
!(x==y) returns true
程序判断语句:
和C#、java、C等判断语句一样。有if..else/else..if、switch语句 --直接看Code
复制代码 代码如下: