公司建网站 内部邮箱,广告平面设计教程,阳江房产网,电子产品网站建设模板Lustre v6 中的 Lustre Core 部分支持的表达式种类中#xff0c;支持布尔表达式。相关的表达式包括and, or, xor, not, #, nor。
相应的文法定义为
Expression :: not Expression| Expression and Expression| Expression or Expression | Expression xor Expression | # (…Lustre v6 中的 Lustre Core 部分支持的表达式种类中支持布尔表达式。相关的表达式包括and, or, xor, not, #, nor。
相应的文法定义为
Expression :: not Expression| Expression and Expression| Expression or Expression | Expression xor Expression | # (ExpressionList) | nor (ExpressionList)and 与运算
and 运算符表示与运算使用样例如下
function andExpr(a,b: bool) returns (c: bool)
letc a and b;
telor 或运算
or 运算符表示或运算使用样例如下
function orExpr(a,b: bool) returns (c: bool)
letc a or b;
telxor 异或运算
xor 运算符表示异或运算使用样例如下
function xorExpr(a, b: bool) returns (c: bool)
letc a xor b;
telnot 取反运算
not 运算符表示取反运算使用样例如下
function notExpr (i: bool) returns (o: bool)
leto not i;
tel# sharp 运算
# 运算符的输入为布尔变量列表列表中至多有一项true 时表达式输出为 true反之为 false。
function sharp(i1,i2,i3: bool) returns (o: bool)
leto #(i1, i2, i3);
telnor 运算
nor 运算符的输入为布尔变量列表列表中无 true 时表达式输出为 true反之为 false。
function norExpr(a,b,c: bool) returns (o: bool)
leto nor (a,b,c);
tel