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

18
LINES

< > BotCompany Repo | #1003262 // charPut / charPut_flush - put individual chars, then flush to System.out

JavaX fragment (include)

static new StringBuffer charPut_buf;

ssvoid charPut(S s) {
  charPut_buf.append(s);
}

ssvoid charPut(char c) {
  charPut_buf.append(c);
}

ssvoid charPut_flush() {
  if (nempty(charPut_buf)) {
    S s = dropSuffix("\n", str(charPut_buf));
    charPut_buf = new StringBuffer;
    if (nempty(s))
      print(s);
  }
}

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: #1003262
Snippet name: charPut / charPut_flush - put individual chars, then flush to System.out
Eternal ID of this version: #1003262/1
Text MD5: 2a231f5d979faece73ae10308dbaf755
Author: stefan
Category: javax / talking robots
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-06-12 17:55:48
Source code size: 334 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 608 / 571
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)