逻辑表达式

其实最终实现的算法与【算术表达式】一样的:


if x == 1

语法:CompareExpression(x == 1)

------------------------------------------------------------------------------

if x == 1 && y == 2 && z == 3

语法:and(and(x == 1, y == 2), z == 3)

------------------------------------------------------------------------------

if x == 1 || y == 2 && z == 3

语法:or(x == 1, and(y==2, z==3))

------------------------------------------------------------------------------

if x == 1 && y == 2 || z == 3

语法:or(and(x==1, y==2), z==3)

------------------------------------------------------------------------------

if (x == 1 || y == 2) && z == 3

语法:and(or(x==1, y==2), z==3)

------------------------------------------------------------------------------

if x == 1 || y == 2 || z == 3

语法:or(or(x == 1, y == 2), z == 3)

------------------------------------------------------------------------------

if x == 1 && y == 2 || c == 3 && (d == 4 || e == 5 && f == 6) && g == 7

语法: or(and(x == 1, y == 2), and(and(c == 3, or(d == 4, and(e == 5, f == 6))), g == 7)

------------------------------------------------------------------------------

if (d == 4 || e == 5 && f == 6) && x == 1 && y == 2 || c == 3 && g == 7

语法: or(and(and(or(d==4, and(e == 5, f==6)), x == 1), y == 2), and(c == 3, g == 7))

posted @ 2018-04-09 06:06  personnel  阅读(595)  评论(0编辑  收藏  举报
友情链接:图片批量处理工具 gif动态图制作工具 制作电子相册 图片排版工具 制作淘宝主图视频 MKScript 鼠标键盘自动化脚本语言