Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

17
LINES

< > BotCompany Repo | #1003568 // Engine Include / Let's do GMail

JavaX fragment (include)

1  
!include #1003413 // LooseBot v5
2  
3  
static OccTree2 botTree;
4  
5  
static O makeBot = func { new LooseBot(botTree, null).debugOn() };
6  
7  
svoid expandDialogs(L<Dialog> dialogs) {
8  
  for (Dialog d : dialogs)
9  
    for (int i = 0; i < l(d.poem); i++) {
10  
      E e = d.poem.get(i);
11  
      if (!e.state()) continue;
12  
      int idx = e.text().indexOf("=>");
13  
      if (idx < 0) continue;
14  
      d.poem.set(i, E.state("get " + e.text().substring(0, idx).trim()));
15  
      d.poem.add(i+1, E.state("result is " + e.text().substring(idx+2).trim()));
16  
    }
17  
}

Author comment

Began life as a copy of #1003567

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1003568
Snippet name: Engine Include / Let's do GMail
Eternal ID of this version: #1003568/1
Text MD5: 40ecba97e919e64e6dd8436679e0de08
Author: stefan
Category: javax / talking robots
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-07-19 17:33:24
Source code size: 546 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 471 / 833
Referenced in: [show references]