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

14
LINES

< > BotCompany Repo | #1001074 // readLine - now prints locally with prefix

JavaX fragment (include)

static volatile bool readLine_noReadLine;

sS readLine_lastInput;
sS readLine_prefix = "[] ";

static String readLine() {
  if (readLine_noReadLine) null;
  S s = readLineHidden();
  if (s != null) {
    readLine_lastInput = s;
    print(readLine_prefix + s);
  }
  ret s;
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1001074
Snippet name: readLine - now prints locally with prefix
Eternal ID of this version: #1001074/5
Text MD5: 818059c5e7e438f3ce66bfad07542788
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-03-06 21:58:42
Source code size: 287 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 837 / 6676
Version history: 4 change(s)
Referenced in: #1001110 - x26.java (JavaX)
#1001148 - x27.java (JavaX)
#1001189 - readLineHidden - for password entry and such
#1001370 - x28.java (JavaX)
#1002427 - Accellerating 629 (SPIKE)
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1013793 - readLineQuietly
#1013846 - readLine - old version printing globally
#3000382 - Answer for ferdie (>> t = 1, f = 0)