我在 PlusCal 中的基本代码如下。
---- MODULE flags ----
EXTENDS TLC, Integers
(* --algorithm flags
define
IsFive(z) == z = 5
end define
begin
IsFive(5)
end algorithm; *)
====
线IsFive(5)
在工具箱中突出显示,当我尝试运行模型时,我收到一个错误,即宏 IsFive 未定义。
在类似的注释中,https ://learntla.com/tla/operators/说操作符是函数,然后在接下来的章节中继续定义函数。
假设我需要检查验证参数是否为 5 的功能。我应该使用什么,运算符或函数?