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)

1  
static new StringBuffer charPut_buf;
2  
3  
ssvoid charPut(S s) {
4  
  charPut_buf.append(s);
5  
}
6  
7  
ssvoid charPut(char c) {
8  
  charPut_buf.append(c);
9  
}
10  
11  
ssvoid charPut_flush() {
12  
  if (nempty(charPut_buf)) {
13  
    S s = dropSuffix("\n", str(charPut_buf));
14  
    charPut_buf = new StringBuffer;
15  
    if (nempty(s))
16  
      print(s);
17  
  }
18  
}

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: 609 / 573
Referenced in: [show references]