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

34
LINES

< > BotCompany Repo | #737 // Generic snippet interpreter (developing)

JavaX source code [tags: use-pretranspiled] - run with: x30.jar

Transpiled version (258L) is out of date.

!636
!standard functions

main {
  psvm {
    String snippetID = "#1000574";
    if (args.length != 0) snippetID = args[0];
    
    new StringBuilder buf;
    String prog = null;
    buf.append("== Please concat programs ==\n");
    int programNr = 0;
    for (String l : toLines(loadSnippet(snippetID))) {
      l = l.trim();
      if (l.length() == 0) continue;
      String id = findSnippetNamed(l);
      if (id == null)
        buf.append("// Ignoring line: " + l + "\n");
      else {
        ++programNr;
        buf.append("== Program " + programNr + " ==\n");
        prog = loadSnippet(id);
        buf.append(prog + "\n");
      }
    }
    print ""
    String result;
    if (programNr == 1)
      result = prog;
    else
      result = buf.toString();
    System.out.println(result);
  }
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #737
Snippet name: Generic snippet interpreter (developing)
Eternal ID of this version: #737/1
Text MD5: 0db8195f2405e6929337dc385b976293
Author: stefan
Category:
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2015-08-15 01:28:51
Source code size: 836 bytes / 34 lines
Pitched / IR pitched: No / Yes
Views / Downloads: 597 / 661
Referenced in: [show references]