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?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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;
}