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

12
LINES

< > BotCompany Repo | #1014087 - autoCalculateList

JavaX fragment (include)

static S autoCalculateList(S name) {
  print("Auto-calculating list: " + name);
  S calc = mechList_raw(name + " | Calculation");
  calc = trimDropPrefixTrim("=", calc);
  O result = javaEval(calc);
  S text;
  if (result instanceof Collection)
    text = lines(allToString((Collection) result));
  else
    text = strOrEmpty(result);
  ret print(botEditMechList(name, text));
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1014087
Snippet name: autoCalculateList
Eternal ID of this version: #1014087/5
Text MD5: 7b7971c2e839438298de515c6ba5c1c0
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-04-15 17:33:55
Source code size: 389 bytes / 12 lines
Pitched / IR pitched: No / No
Views / Downloads: 288 / 298
Version history: 4 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1014087 & http://1014087.tinybrain.de