开发者

ternary in postlude?

开发者 https://www.devze.com 2023-03-02 16:38 出处:网络
Can I do ternary in the postlude(s) the same w开发者_如何学Goay 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 prelu

Can I do ternary in the postlude(s) the same w开发者_如何学Goay 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?


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;
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号