pico-engine-core
Advanced tools
Changelog
0.11.0 - May 20, 2017
<name> = defaction(<params...>){
<declaration 0>
<declaration 1>
...
<action block (i.e. anything you would put in a rule action)>
}
For example
chooser = defaction(val){
baz = "hello"
qux = "bye"
choose val {
asdf =>
foo(val)
fdsa =>
bar(val, "ok", "done")
}
}
configure using
)foo = function(bar = 2, baz = bar + 3){
bar + baz
}
//-or- when it gets too long
foo = function(
bar = 2,
baz = bar + 3,
qux = 4,
quux = blah(qux),
){
...
}
//defaction parameters work the same way as functions
//the following are now actions and cannot be used as a function
engine:newPico
engine:removePico
engine:newChannel
engine:removeChannel
engine:registerRuleset
engine:unregisterRuleset
engine:installRuleset
engine:uninstallRuleset
event:send
schedule:remove