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

10
LINES

< > BotCompany Repo | #1007879 // xyzIndexToVar

JavaX fragment (include)

static S xyzIndexToVar(int i) {
  assertTrue(i > 0);
  if (i == 1) ret "X";
  if (i == 2) ret "Y";
  if (i == 3) ret "Z";
  i -= 3;
  if (i <= 26)
    ret "A" + (char) ('A' + i-1);
  fail("var too high");
}

Author comment

Began life as a copy of #1007682

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: #1007879
Snippet name: xyzIndexToVar
Eternal ID of this version: #1007879/3
Text MD5: 0e373cefcf33cbe3a5fe7fcf7785ba11
Author: stefan
Category: javax / formatting
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-13 17:20:58
Source code size: 215 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 398 / 436
Version history: 2 change(s)
Referenced in: [show references]