ternary in postlude?

2019-08-07 09:20发布

Can I do ternary in the postlude(s) the same way that I do them int he prelude? In other words have it fire off different calls depending on the say something was evaluated in the prelude?

标签: krl
1条回答
做个烂人
2楼-- · 2019-08-07 09:58

Yes. You can include a guard condition on a postlude expression. This works for both explicit event raising and persistant variable modification. The expression following if can be any valid expression, including functions.

Example:

fired {
  raise explicit event "foo" if cheese == 5;
}
查看更多
登录 后发表回答