1 | static S ai_ifThenSay(S rule, S input) {
|
2 | new Matches m; |
3 | ai_opCheck(rule, "if * then say *", m); |
4 | |
5 | S condition = roundBrackets($1); |
6 | S sf = ai_text(condition, "matches to predicate", "$X"); |
7 | if (sf == null) fail("no matching predicate found for " + condition);
|
8 | if (!isTrue(ai_callSafeSFOnInput(sf, input))) null; |
9 | ret $2; |
10 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1013272 |
| Snippet name: | ai_ifThenSay |
| Eternal ID of this version: | #1013272/3 |
| Text MD5: | 0bd930777b4ce48c4b3a931843bcdc6c |
| Author: | stefan |
| Category: | javax / a.i. |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-12-31 02:02:40 |
| Source code size: | 343 bytes / 10 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 551 / 585 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |